Develop and Download Open Source Software

Browse Subversion Repository

Contents of /NNDDv2/trunk/src/org/mineap/nndd/view/VideoInfoView.as

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1009 - (show annotations) (download)
Sun Nov 2 04:44:56 2014 UTC (9 years, 5 months ago) by mineap
File size: 60418 byte(s)
"nicomimi"と"にこ☆さうんど"へのリンクを削除
1 import flash.display.StageDisplayState;
2 import flash.events.Event;
3 import flash.events.KeyboardEvent;
4 import flash.events.MouseEvent;
5 import flash.events.NativeWindowBoundsEvent;
6 import flash.events.TextEvent;
7 import flash.events.TimerEvent;
8 import flash.geom.Rectangle;
9 import flash.net.URLRequest;
10 import flash.net.navigateToURL;
11 import flash.ui.Keyboard;
12 import flash.utils.Timer;
13
14 import mx.collections.ArrayCollection;
15 import mx.collections.Sort;
16 import mx.collections.SortField;
17 import mx.controls.Alert;
18 import mx.controls.CheckBox;
19 import mx.controls.ComboBox;
20 import mx.controls.DataGrid;
21 import mx.controls.HSlider;
22 import mx.controls.RadioButton;
23 import mx.core.Application;
24 import mx.core.DragSource;
25 import mx.core.FlexGlobals;
26 import mx.core.Window;
27 import mx.events.AIREvent;
28 import mx.events.CloseEvent;
29 import mx.events.DataGridEvent;
30 import mx.events.DragEvent;
31 import mx.events.FlexEvent;
32 import mx.events.ListEvent;
33 import mx.events.NumericStepperEvent;
34 import mx.events.SliderEvent;
35
36 import org.mineap.nndd.LogManager;
37 import org.mineap.nndd.Message;
38 import org.mineap.nndd.model.NNDDVideo;
39 import org.mineap.nndd.model.PlayList;
40 import org.mineap.nndd.model.SearchItem;
41 import org.mineap.nndd.model.SearchSortString;
42 import org.mineap.nndd.model.NNDDSearchType;
43 import org.mineap.nndd.playList.PlayListManager;
44 import org.mineap.nndd.player.PlayerController;
45 import org.mineap.nndd.util.DataGridColumnWidthUtil;
46 import org.mineap.nndd.util.PathMaker;
47 import org.mineap.util.config.ConfUtil;
48 import org.mineap.util.config.ConfigManager;
49
50 private var videoPlayer:VideoPlayer;
51 private var playerController:PlayerController;
52 private var logManager:LogManager;
53
54 public var isPlayListRepeat:Boolean = false;
55 public var isSyncComment:Boolean = true;
56 public var isPlayerFollow:Boolean = true;
57 public var isRenewCommentEachPlay:Boolean = false;
58 public var isRenewOtherCommentWithCommentEachPlay:Boolean = false;
59 public var isResizePlayerEachPlay:Boolean = true;
60 public var isHideUnderController:Boolean = false;
61 public var commentScale:Number = 1.0;
62 public var fps:Number = 15;
63 public var isShowOnlyPermissionComment:Boolean = false;
64 public var showCommentCountPerMin:int = 50;
65 public var showOwnerCommentCountPerMin:int = 50;
66 public var showCommentSec:int = 3;
67 public var isAntiAlias:Boolean = true;
68 public var commentAlpha:int = 100;
69 public var isEnableJump:Boolean = true;
70 public var isAskToUserOnJump:Boolean = true;
71 public var isInfoViewAlwaysFront:Boolean = false;
72 public var isCommentFontBold:Boolean = true;
73 public var isShowAlwaysNicowariArea:Boolean = false;
74 public var selectedResizeType:int = RESIZE_TYPE_NICO;
75 public var isAlwaysEconomyForStreaming:Boolean = false;
76 public var isHideTagArea:Boolean = false;
77 public var isAppendComment:Boolean = false;
78 public var isHideSekaShinComment:Boolean = false;
79 public var isShowHTMLOwnerComment:Boolean = true;
80 public var isEnableWideMode:Boolean = true;
81 public var useOldVersionVideoSize:Boolean = false;
82 public var relationSortIndex:int = 0;
83 public var relationOrderIndex:int = 0;
84 public var isNgUpEnable:Boolean = true;
85 public var isSmoothing:Boolean = true;
86 public var isSmoothingOnlyNotPixelIdenticalDimensions:Boolean = true;
87 public var playerQuality:int = 2;
88 public var isFollowInfoViewHeight:Boolean = false;
89 public var isNotPlayNicowari:Boolean = false;
90 public var isOpenFileDialogWhenOpenPlayer:Boolean = false;
91 public var is184:Boolean = true;
92 public var useDarkColor:Boolean = false;
93 public var ownerCommentTextSize:int = 70;
94
95 public static const RESIZE_TYPE_NICO:int = 1;
96 public static const RESIZE_TYPE_VIDEO:int = 2;
97
98 public var videoUrlMap:Object = new Object();
99
100 public var myListMap:Object = new Object();
101
102 private var lastRect:Rectangle = new Rectangle();
103
104 private var seekTimer:Timer;
105 private var seekValue:Number = 0;
106
107 public var isActive:Boolean = false;
108
109 public var playListName:String = "";
110
111 [Bindable]
112 public var commentListProvider:ArrayCollection = new ArrayCollection();
113 [Bindable]
114 public var ownerCommentProvider:ArrayCollection = new ArrayCollection();
115 [Bindable]
116 private var playListProvider:ArrayCollection = new ArrayCollection();
117 [Bindable]
118 public var localTagProvider:Array = new Array();
119 [Bindable]
120 public var nicoTagProvider:Array = new Array();
121 [Bindable]
122 public var ichibaLocalProvider:ArrayCollection = new ArrayCollection();
123 [Bindable]
124 public var ichibaNicoProvider:ArrayCollection = new ArrayCollection();
125 [Bindable]
126 public var ngListProvider:ArrayCollection = new ArrayCollection();
127 [Bindable]
128 public var owner_text_nico:String = "";
129 [Bindable]
130 public var owner_text_local:String = "";
131 [Bindable]
132 private var myListDataProvider:Array = new Array();
133 [Bindable]
134 public var savedCommentListProvider:Array = new Array();
135 [Bindable]
136 public var owner_text_temp:String = "";
137 [Bindable]
138 public var relationDataProvider:ArrayCollection = new ArrayCollection();
139 [Bindable]
140 public var relationSortComboboxDataProvider:Array = new Array("���������������", "���������������", "���������", "���������");
141 [Bindable]
142 public var relationOrderComboboxDataProvider:Array = new Array("������", "������");
143 [Bindable]
144 private var label_playListTitle_dataProvider:String = "";
145 [Bindable]
146 public var videoType:String = "";
147 [Bindable]
148 public var connectionType:String = "";
149 [Bindable]
150 public var videoServerUrl:String = "";
151 [Bindable]
152 public var messageServerUrl:String = "";
153 [Bindable]
154 public var economyMode:String = "";
155 [Bindable]
156 public var nickName:String = "";
157 [Bindable]
158 public var isPremium:String = "";
159 [Bindable]
160 public var pubUserNameIconUrl:String = "";
161 [Bindalbe]
162 public var pubUserName:String = "";
163 [Bindalbe]
164 public var pubUserLinkButtonText:String = "";
165 [Bindable]
166 public var currentWindowSize:String = "";
167 [Bindable]
168 public var format:String = "";
169 [Bindable]
170 public var videoSize:String = "";
171
172 public function init(playerController:PlayerController, videoPlayer:VideoPlayer, logManager:LogManager):void{
173 this.videoPlayer = videoPlayer;
174 this.playerController = playerController;
175 this.logManager = logManager;
176
177 this.addEventListener(FlexEvent.CREATION_COMPLETE, function(event:FlexEvent):void{
178 stage.addEventListener(AIREvent.WINDOW_ACTIVATE, function(event:AIREvent):void{
179 isActive = true;
180 });
181 stage.addEventListener(AIREvent.WINDOW_DEACTIVATE, function(event:AIREvent):void{
182 isActive = false;
183 });
184 });
185
186 readStore();
187 }
188
189 public function resetInfo():void{
190 localTagProvider = new Array();
191 nicoTagProvider = new Array();
192 ichibaLocalProvider = new ArrayCollection();
193 ichibaNicoProvider = new ArrayCollection();
194
195 owner_text_local = "";
196 owner_text_nico = "";
197 owner_text_temp = "";
198 }
199
200 private function windowClosing(event:Event):void{
201
202 event.preventDefault();
203
204 // if(this.videoPlayer != null && !this.videoPlayer.closed){
205 // this.videoPlayer.close();
206 // }
207 //
208 // this.playerController.destructor();
209
210 this.visible = false;
211
212 }
213
214 private function play():void{
215 this.playerController.play();
216 }
217
218 private function stop():void{
219 this.playerController.stop();
220 }
221
222 private function checkBoxAppendCommentChanged(event:Event):void{
223 this.isAppendComment = event.target.selected;
224 FlexGlobals.topLevelApplication.setAppendComment(this.isAppendComment);
225 }
226
227 public function setAppendComment(boolean:Boolean):void{
228 this.isAppendComment = boolean;
229 if(checkBox_isAppendComment != null){
230 checkBox_isAppendComment.selected = boolean;
231 }
232 }
233
234 public function relationItemDoubleClickHandler(event:ListEvent):void{
235 if(relationDataProvider.length > event.rowIndex){
236 var url:String = relationDataProvider[event.rowIndex].col_link;
237 if(url != null && url.length > 0){
238 var videoId:String = PathMaker.getVideoID(url);
239 if(videoId != null){
240 playerController.playMovie(url);
241 }
242 }
243 }
244 }
245
246 public function checkBoxNgUpChanged(event:Event):void{
247 this.isNgUpEnable = checkBox_isNgUpEnable.selected;
248 if(this.playerController != null){
249 this.playerController.reloadLocalComment();
250 }
251 }
252
253 public function checkBoxIsLengthwisePreferredChanged(event:Event):void
254 {
255 var checkBox:CheckBox = (event.currentTarget as CheckBox);
256
257 if (checkBox.selected)
258 {
259 ConfigManager.getInstance().setItem("isLengthwisePreferred", "true");
260 }
261 else
262 {
263 ConfigManager.getInstance().setItem("isLengthwisePreferred", "false");
264 }
265
266 this.playerController.isLengthwisePreferred = checkBox.selected;
267
268 ConfigManager.getInstance().save();
269 }
270
271 public function checkBoxSmoothingChanged(event:Event):void{
272 this.isSmoothing = checkBox_isSmoothing.selected;
273 checkBox_isSmoothingOnlyNotPixelIdenticalDimensions.enabled = this.isSmoothing;
274 if(this.playerController != null){
275 this.playerController.setVideoSmoothing(this.isSmoothing);
276 }
277 }
278
279 public function checkBoxSmoothingOnlyNotPixelIdenticalDimensionsChanged(event:Event):void
280 {
281 this.isSmoothingOnlyNotPixelIdenticalDimensions = checkBox_isSmoothingOnlyNotPixelIdenticalDimensions.selected;
282 if (this.playerController != null)
283 {
284 this.playerController.setVideoSmoothing(this.isSmoothing);
285 }
286 }
287
288 private function checkBoxPlayerAlwaysFrontChanged(event:Event):void{
289 this.videoPlayer.isAlwaysFront = (event.currentTarget as CheckBox).selected;
290 this.videoPlayer.alwaysInFront = (event.currentTarget as CheckBox).selected;
291 }
292
293 private function checkBoxInfoViewAlwaysFrontChanged(event:Event):void{
294 this.isInfoViewAlwaysFront = (event.currentTarget as CheckBox).selected;
295 this.alwaysInFront = (event.currentTarget as CheckBox).selected;
296 }
297
298 private function checkBoxCommentFontBoldChanged(event:Event):void{
299 this.isCommentFontBold = this.checkBox_commentBold.selected;
300 playerController.setCommentFontBold(this.isCommentFontBold);
301 }
302
303 private function checkboxSyncCommentChanged():void{
304 this.isSyncComment = this.checkbox_SyncComment.selected;
305 this.commentListProvider.sort = new Sort();
306 this.commentListProvider.sort.fields = [new SortField("vpos_column",true)];
307 this.commentListProvider.refresh();
308 }
309
310 private function checkboxRepeatAllChanged():void{
311 this.isPlayListRepeat = this.checkBox_repeatAll.selected;
312 if(isPlayListRepeat){
313 videoPlayer.setIsRepeat(false);
314 }
315 }
316
317 private function checkboxPlayerFollowChanged(event:Event):void{
318 this.isPlayerFollow = this.checkbox_playerFollow.selected;
319 if((event.currentTarget as CheckBox).selected){
320 this.videoPlayer.followInfoView(this.videoPlayer.lastRect);
321 }
322 }
323
324 private function checkboxFollowInfoViewHeight(event:Event):void
325 {
326 this.isFollowInfoViewHeight = this.checkbox_followInfoViewHeight.selected;
327 if ((event.currentTarget as CheckBox).selected)
328 {
329 this.videoPlayer.resizeInfoView();
330 }
331 }
332
333 private function checkboxHideUnderControllerChanged(event:Event):void{
334 this.isHideUnderController = this.checkbox_hideUnderController.selected;
335 if(this.videoPlayer.stage.displayState != StageDisplayState.FULL_SCREEN_INTERACTIVE){
336 if((event.currentTarget as CheckBox).selected){
337 //������������������������������
338 this.videoPlayer.showUnderController(false, true);
339 }else{
340 //������������������������������
341 this.videoPlayer.showUnderController(true, true);
342 }
343 }
344 this.videoPlayer.videoController.resetAlpha(true);
345 }
346
347 private function checkboxHideTagAreaChanged(event:Event):void{
348 this.isHideTagArea = this.checkbox_hideTagArea.selected;
349 if(this.videoPlayer.stage.displayState != StageDisplayState.FULL_SCREEN_INTERACTIVE){
350 if((event.currentTarget as CheckBox).selected){
351 //���������������������������
352 this.videoPlayer.showTagArea(false, true);
353 }else{
354 //������������������������������������
355 this.videoPlayer.showTagArea(true, true);
356 }
357 }
358 this.videoPlayer.videoController.resetAlpha(true);
359 }
360
361 public function changeWideMode():void{
362 if(isResizePlayerEachPlay){
363 if(this.selectedResizeType == VideoInfoView.RESIZE_TYPE_NICO){
364 isEnableWideMode = !isEnableWideMode;
365 if(checkbox_enableWideMode != null){
366 checkbox_enableWideMode.selected = isEnableWideMode;
367 }
368 this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
369 }
370 }
371 }
372
373 private function checkboxResizePlayerEachPlay(event:Event):void{
374 this.isResizePlayerEachPlay = this.checkbox_resizePlayerEachPlay.selected;
375 radioGroup_resizeType.selectedValue = selectedResizeType;
376 if(this.isResizePlayerEachPlay){
377 this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
378 this.radioButton_resizeNicoDou.enabled = true;
379 this.radioButton_resizeVideo.enabled = true;
380 if(this.selectedResizeType == VideoInfoView.RESIZE_TYPE_NICO){
381 this.checkbox_enableWideMode.enabled = true;
382 }else{
383 this.checkbox_enableWideMode.enabled = false;
384 }
385 }else{
386 this.videoPlayer.nowRatio = -1;
387 this.radioButton_resizeNicoDou.enabled = false;
388 this.radioButton_resizeVideo.enabled = false;
389 this.checkbox_enableWideMode.enabled = false;
390 }
391
392 }
393
394 private function checkBoxAlwaysEconomyChanged(event:Event):void{
395 isAlwaysEconomyForStreaming = this.checkBox_isAlwaysEconomyForStreaming.selected;
396 }
397
398
399 private function checkBoxShowAlwaysNicowariAreaChanged(event:Event):void{
400 isShowAlwaysNicowariArea = this.checkBox_showAlwaysNicowariArea.selected;
401 videoPlayer.setShowAlwaysNicowariArea(isShowAlwaysNicowariArea);
402 }
403
404 private function checkBoxIsNotPlayNicowariChanged(event:Event):void
405 {
406 this.isNotPlayNicowari = this.checkBox_isNotPlayNicowari.selected;
407
408 if (isNotPlayNicowari)
409 {
410 playerController.stopNicowari();
411 videoPlayer.hideNicowariArea();
412 }
413 else if (isShowAlwaysNicowariArea)
414 {
415 videoPlayer.showNicowariArea();
416 }
417 }
418
419 public function setShowAlwaysNicowariArea(isShow:Boolean):void{
420 if(this.checkBox_showAlwaysNicowariArea != null){
421 this.checkBox_showAlwaysNicowariArea.selected = isShow;
422 }
423 isShowAlwaysNicowariArea = isShow;
424 }
425
426 private function checkBoxRenewCommentChanged():void{
427 isRenewCommentEachPlay = checkBox_renewComment.selected;
428 checkBox_renewTagAndNicowari.enabled = isRenewCommentEachPlay;
429 checkBox_isAppendComment.enabled = isRenewCommentEachPlay;
430 }
431
432 private function checkBoxCommentBoldChanged(event:Event):void{
433 this.isCommentFontBold = checkBox_commentBold.selected;
434 playerController.setCommentFontBold(this.isCommentFontBold);
435 }
436
437 public function setRelationComboboxEnable(enabled:Boolean):void{
438 if(combobox_relationSort != null){
439 (combobox_relationSort as ComboBox).enabled = enabled;
440 }
441 if(combobox_relationOrder != null){
442 (combobox_relationOrder as ComboBox).enabled = enabled;
443 }
444 }
445
446 private function thumbPress(event:SliderEvent):void{
447 this.playerController.sliderChanging = true;
448 }
449
450 private function thumbRelease(event:SliderEvent):void{
451 this.playerController.sliderChanging = false;
452 this.playerController.seek(event.value);
453 }
454
455 private function sliderVolumeChanged(evt:SliderEvent):void{
456 this.playerController.setVolume(evt.value);
457 }
458
459 private function sliderFpsChanged(event:SliderEvent):void{
460 this.fps = getFps(event.value);
461 this.playerController.changeFps(this.fps);
462 }
463
464
465 private function commentCountNumStepperChanged(event:NumericStepperEvent):void
466 {
467 this.showCommentCountPerMin = event.value;
468 }
469
470 private function ownerCommentCountNumStepperChanged(event:NumericStepperEvent):void
471 {
472 this.showOwnerCommentCountPerMin = event.value;
473 }
474
475 private function addNGListIdButtonClicked():void{
476 var index:int = -1;
477 if(tabNavigator_comment.selectedIndex == 0){
478 index = this.dataGrid_comment.selectedIndex;
479 }else if(tabNavigator_comment.selectedIndex == 1){
480 index = this.dataGrid_oldComment.selectedIndex;
481 }
482 if(index > -1){
483 this.playerController.ngListManager.addNgID(commentListProvider.getItemAt(index).user_id_column);
484 }
485 }
486
487 private function addNGListWordButtonClicked():void{
488 var index:int = -1;
489 if(tabNavigator_comment.selectedIndex == 0){
490 index = this.dataGrid_comment.selectedIndex;
491 }else if(tabNavigator_comment.selectedIndex == 1){
492 index = this.dataGrid_oldComment.selectedIndex;
493 }
494 if(index > -1){
495 this.playerController.ngListManager.addNgWord(commentListProvider.getItemAt(index).comment_column);
496 }
497 }
498
499 private function addPermissionIdButtonClicked():void{
500 var index:int = -1;
501 if(tabNavigator_comment.selectedIndex == 0){
502 index = this.dataGrid_comment.selectedIndex;
503 }else if(tabNavigator_comment.selectedIndex == 1){
504 index = this.dataGrid_oldComment.selectedIndex;
505 }
506 if(index > -1){
507 this.playerController.ngListManager.addPermissionId(commentListProvider.getItemAt(index).user_id_column);
508 }
509 }
510
511 private function headerReleaseHandler(event:DataGridEvent):void{
512 if(event.columnIndex == 1){
513 this.isSyncComment = false;
514 this.checkbox_SyncComment.selected = false;
515 }
516 }
517
518 /**
519 * TextInput������������������������ID���NG���������������������������
520 *
521 */
522 private function addItemToNgList():void{
523 playerController.ngListManager.addItemToNgList(textInput_ng.text, combobox_ngKind.selectedLabel);
524 }
525
526 private function ngListItemClicked(event:ListEvent):void{
527 playerController.ngListManager.ngListItemClicked(event);
528 }
529
530 /**
531 * ���������������������NG���������NG������������������������������������
532 *
533 */
534 private function removeItemFromNgList():void{
535 playerController.ngListManager.removeItemFromNgList();
536 }
537
538 private function ngTextInputEnter(event:FlexEvent):void{
539 playerController.ngListManager.addItemToNgList(textInput_ng.text, combobox_ngKind.selectedLabel);
540 }
541
542 private function fpsDataTipFormatFunction(value:Number):String{
543 return new String(getFps(value));
544 }
545
546 private function getFps(value:Number):Number{
547 switch(value){
548 case 1:
549 return 7.5;
550 case 2:
551 return 15;
552 case 3:
553 return 30;
554 case 4:
555 return 60;
556 case 5:
557 return 120;
558 default:
559 return 15;
560 }
561 }
562
563 private function getValueByFps(fps:Number):int{
564 switch(fps){
565 case 7.5:
566 return 1;
567 case 15:
568 return 2;
569 case 30:
570 return 3;
571 case 60:
572 return 4;
573 case 120:
574 return 5;
575 default:
576 return 2;
577 }
578 }
579
580 private function keyListener(event:KeyboardEvent):void{
581 if(event.keyCode == Keyboard.ESCAPE){
582 }else if(event.keyCode == Keyboard.F11 || (event.keyCode == Keyboard.F && (event.controlKey || event.commandKey))){
583 // trace("Ctrl + " + event.keyCode);
584 this.videoPlayer.changeFull();
585 }else if(event.keyCode == Keyboard.C){
586 // trace(event.keyCode);
587 this.stage.nativeWindow.activate();
588 }else if(event.keyCode == Keyboard.SPACE){
589 this.playerController.play();
590 }else if(event.keyCode == Keyboard.LEFT){
591 //���
592 if(seekTimer != null){
593 seekTimer.stop();
594 }
595 seekTimer = new Timer(100, 1);
596 seekTimer.addEventListener(TimerEvent.TIMER_COMPLETE, function(event:Event):void{
597 var newValue:Number = videoPlayer.videoController.slider_timeline.value + seekValue;
598 if(newValue <= (videoPlayer.videoController.slider_timeline as HSlider).minimum){
599 newValue = 0;
600 }else if(newValue >= (videoPlayer.videoController.slider_timeline as HSlider).maximum){
601 newValue = (videoPlayer.videoController.slider_timeline as HSlider).maximum;
602 }
603 trace(newValue +" = "+videoPlayer.videoController.slider_timeline.value +"+"+ seekValue);
604 playerController.seek(newValue);
605 seekValue = 0;
606 });
607 seekTimer.start();
608 this.seekValue -= 10;
609 }else if(event.keyCode == Keyboard.RIGHT){
610 //���
611 if(seekTimer != null){
612 seekTimer.stop();
613 }
614 seekTimer = new Timer(100, 1);
615 seekTimer.addEventListener(TimerEvent.TIMER_COMPLETE, function(event:Event):void{
616 var newValue:Number = videoPlayer.videoController.slider_timeline.value + seekValue;
617 if(newValue <= (videoPlayer.videoController.slider_timeline as HSlider).minimum){
618 newValue = 0;
619 }else if(newValue >= (videoPlayer.videoController.slider_timeline as HSlider).maximum){
620 newValue = (videoPlayer.videoController.slider_timeline as HSlider).maximum;
621 }
622 trace(newValue +" = "+videoPlayer.videoController.slider_timeline.value +"+"+ seekValue);
623 playerController.seek(newValue);
624 seekValue = 0;
625 });
626 seekTimer.start();
627 this.seekValue += 10;
628 }else if(event.keyCode == Keyboard.UP){
629 this.playerController.setVolume(this.videoPlayer.videoController.slider_volume.value + 0.05);
630 }else if(event.keyCode == Keyboard.DOWN){
631 this.playerController.setVolume(this.videoPlayer.videoController.slider_volume.value - 0.05);
632 }
633 }
634
635 private function radioButtonResizeTypeChanged(event:Event):void{
636 this.selectedResizeType = int(RadioButton(event.currentTarget).value);
637
638 if(this.selectedResizeType == VideoInfoView.RESIZE_TYPE_NICO){
639 this.checkbox_enableWideMode.enabled = true;
640 this.checkbox_useOldVersionVideoSize.enabled = true;
641 }else{
642 this.checkbox_enableWideMode.enabled = false;
643 this.checkbox_useOldVersionVideoSize.enabled = false;
644 }
645
646 this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
647 }
648
649 private function checkboxEnableWideModeChanged(event:Event):void{
650 this.isEnableWideMode = event.target.selected;
651 this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
652 }
653
654 private function checkboxUseOldVersionVideoSizeChanged(event:Event):void
655 {
656 this.useOldVersionVideoSize = event.target.selected;
657 this.playerController.isUseOldVersionVideoSize(this.useOldVersionVideoSize);
658 this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
659 }
660
661 private function checkBox_repeatAllCompleteHandler(event:FlexEvent):void{
662 checkBox_repeatAll.selected = isPlayListRepeat;
663 }
664
665 private function checkBoxIsSOPCChanged(event:MouseEvent):void{
666 isShowOnlyPermissionComment = checkBox_isShowOnlyPermissionComment.selected;
667 if(this.playerController != null){
668 this.playerController.reloadLocalComment();
669 }
670 }
671
672 private function checkBoxRenewTagNicowariChanged():void{
673 isRenewOtherCommentWithCommentEachPlay = checkBox_renewTagAndNicowari.selected;
674 }
675
676 private function checkBoxIsEnableJump(event:MouseEvent):void{
677 isEnableJump = event.currentTarget.selected;
678 (checkBox_askToUserOnJump as CheckBox).enabled = isEnableJump;
679 }
680
681 private function checkBoxIsAskToUserOnJump(event:MouseEvent):void{
682 isAskToUserOnJump = event.currentTarget.selected;
683 }
684
685 private function checkBoxIs184(event:MouseEvent):void
686 {
687 is184 = event.currentTarget.selected;
688 }
689
690 private function checkBox_useDarkColorChanged(event:MouseEvent):void
691 {
692 this.useDarkColor = event.currentTarget.selected;
693
694 this.changeColor(useDarkColor);
695
696 }
697
698 private function checkBoxHideSekaShinComment(event:MouseEvent):void{
699 isHideSekaShinComment = event.currentTarget.selected;
700
701 if(this.playerController != null){
702 this.playerController.reloadLocalComment();
703 }
704 }
705
706 private function commentListDoubleClicked(event:ListEvent):void{
707 var time:String = event.target.selectedItem.vpos_column;
708
709 var min:int = int(time.substring(0,time.indexOf(":")));
710 var sec:int = int(time.substring(time.indexOf(":")+1));
711
712 if(playerController.windowType == PlayerController.WINDOW_TYPE_FLV){
713 this.playerController.seek(min*60 + sec);
714 }else{
715 this.playerController.seek((min*60 + sec)*playerController.swfFrameRate);
716 }
717 }
718
719 private function ichibaDataGridDoubleClicked(event:ListEvent):void{
720 trace((event.currentTarget as DataGrid).dataProvider[event.rowIndex].col_link);
721 var url:String = (event.currentTarget as DataGrid).dataProvider[event.rowIndex].col_link;
722 if(url != null){
723 navigateToURL(new URLRequest(url));
724 }
725 }
726
727 private function commentScaleSliderChanged(event:SliderEvent):void{
728 this.commentScale = event.value;
729 this.playerController.windowResized(true);
730 }
731
732 private function sliderShowCommentTimeChanged(event:SliderEvent):void{
733 this.showCommentSec = event.value;
734 }
735
736 private function sliderCommentAlphaChanged(event:SliderEvent):void{
737 this.commentAlpha = event.value;
738 playerController.getCommentManager().setCommentAlpha(this.commentAlpha/100);
739 }
740
741 private function myDataTipFormatFunction(value:Number):String{
742 var nowSec:String="00",nowMin:String="0";
743 nowSec = String(int(value%60));
744 nowMin = String(int(value/60));
745
746 if(nowSec.length == 1){
747 nowSec = "0" + nowSec;
748 }
749 if(nowMin.length == 1){
750 nowMin = "0" + nowMin;
751 }
752 return nowMin + ":" + nowSec;
753 }
754
755 private function windowCompleteHandler():void{
756
757 videoPlayer.alwaysInFront = videoPlayer.isAlwaysFront;
758 this.alwaysInFront = this.isInfoViewAlwaysFront;
759
760 // checkbox_repeat.selected = isRepeat;
761 // checkbox_showComment.selected = isShowComment;
762 checkbox_SyncComment.selected = isSyncComment;
763 checkBox_isShowOnlyPermissionComment.selected = isShowOnlyPermissionComment;
764 checkbox_showHtml.selected = isShowHTMLOwnerComment;
765
766 videoPlayer.setShowAlwaysNicowariArea(isShowAlwaysNicowariArea);
767 playerController.setCommentFontBold(this.isCommentFontBold);
768
769 videoPlayer.showUnderController(!isHideUnderController, true);
770 videoPlayer.showTagArea(!isHideTagArea, true);
771
772
773 var fontSize:int = Number(ConfigManager.getInstance().getItem("fontSize"));
774 this.setChangeFontSize(fontSize);
775
776 this.setStyle("fontFamily", ConfigManager.getInstance().getItem("fontFamily"));
777 this.setStyle("fontSize", fontSize);
778
779 }
780
781 private function comboboxRelationOrderCreationCompleteHandler(event:FlexEvent):void
782 {
783 combobox_relationOrder.selectedIndex = relationOrderIndex;
784 }
785
786 private function comboboxRelationSortCreationCompleteHandler(event:FlexEvent):void
787 {
788 combobox_relationSort.selectedIndex = relationSortIndex;
789 }
790
791 private function relationSortComboboxChange(event:Event):void{
792 relationSortIndex = combobox_relationSort.selectedIndex;
793 playerController.setNicoRelationInfoForRelationSortTypeChange();
794 }
795
796 private function relationOrderComboboxChange(event:Event):void{
797 relationOrderIndex = combobox_relationOrder.selectedIndex;
798 playerController.setNicoRelationInfoForRelationSortTypeChange();
799 }
800
801 private function playerQualitySliderChanged(event:Event):void{
802 playerQuality = slider_playerQuality.value;
803
804 if(playerController != null){
805 playerController.setPlayerQuality(playerQuality);
806 }
807 }
808
809 private function configCanvas1CreationCompleteHandler(event:FlexEvent):void{
810 checkbox_resizePlayerEachPlay.selected = isResizePlayerEachPlay;
811
812 if(isResizePlayerEachPlay){
813 radioButton_resizeNicoDou.enabled = true;
814 radioButton_resizeVideo.enabled = true;
815 }else{
816 radioButton_resizeNicoDou.enabled = false;
817 radioButton_resizeVideo.enabled = false;
818 }
819
820 radioGroup_resizeType.selectedValue = selectedResizeType;
821 if (selectedResizeType != 1)
822 {
823 checkbox_useOldVersionVideoSize.enabled = false;
824 checkbox_enableWideMode.enabled = false;
825 }
826 checkbox_useOldVersionVideoSize.selected = useOldVersionVideoSize;
827 checkbox_enableWideMode.selected = isEnableWideMode;
828
829 checkBox_isSmoothing.selected = isSmoothing;
830 checkBox_isSmoothingOnlyNotPixelIdenticalDimensions.enabled = isSmoothing;
831 checkBox_isSmoothingOnlyNotPixelIdenticalDimensions.selected = isSmoothingOnlyNotPixelIdenticalDimensions;
832
833 if(playerController.getCommentManager() != null){
834 playerController.getCommentManager().setAntiAlias(isAntiAlias);
835 }
836
837 checkBox_isAlwaysEconomyForStreaming.selected = isAlwaysEconomyForStreaming;
838
839 slider_playerQuality.value = playerQuality;
840
841 }
842
843 private function configCanvas2CreationCompleteHandler(event:FlexEvent):void{
844 checkBox_commentBold.selected = isCommentFontBold;
845 checkBox_hideSekaShinComment.selected = isHideSekaShinComment;
846 checkBox_isNgUpEnable.selected = isNgUpEnable;
847
848 slider_commentScale.value = commentScale;
849 slider_fps.value = getValueByFps(fps);
850
851 commentNumStepper.value = showCommentCountPerMin;
852 ownerCommentNumStepper.value = showOwnerCommentCountPerMin;
853
854 slider_showCommentTime.value = showCommentSec;
855 slider_commentAlpha.value = commentAlpha;
856
857 var value:String = ConfigManager.getInstance().getItem("isLengthwisePreferred");
858 if (value != null)
859 {
860 var isLengthwisePreferred:Boolean = ConfUtil.parseBoolean(value);
861 checkBox_isLengthwisePreferred.selected = isLengthwisePreferred;
862 }
863 }
864
865 private function configCanvas3CreationCompleteHandler(event:FlexEvent):void{
866 checkbox_PlayerAlwaysFront.selected = videoPlayer.isAlwaysFront;
867 checkbox_InfoViewAlwaysFront.selected = isInfoViewAlwaysFront;
868
869 checkbox_playerFollow.selected = isPlayerFollow;
870 checkBox_renewComment.selected = isRenewCommentEachPlay;
871 checkBox_renewTagAndNicowari.selected = isRenewOtherCommentWithCommentEachPlay;
872 checkBox_renewTagAndNicowari.enabled = isRenewCommentEachPlay;
873
874 isAppendComment = FlexGlobals.topLevelApplication.getAppendComment();
875 checkBox_isAppendComment.selected = isAppendComment;
876 checkBox_isAppendComment.enabled = isRenewCommentEachPlay;
877
878 checkbox_followInfoViewHeight.selected = isFollowInfoViewHeight;
879
880 checkBox_isNotPlayNicowari.selected = isNotPlayNicowari;
881 checkBox_showAlwaysNicowariArea.selected = isShowAlwaysNicowariArea;
882 checkbox_hideTagArea.selected = isHideTagArea;
883 checkbox_hideUnderController.selected = isHideUnderController;
884
885 checkBox_enableJump.selected = isEnableJump;
886 checkBox_askToUserOnJump.selected = isAskToUserOnJump;
887 checkBox_askToUserOnJump.enabled = isEnableJump;
888
889 checkBox_is184.selected = is184;
890
891 checkBox_useDarkColor.selected = useDarkColor;
892
893 }
894
895
896 public function isRepeatAll():Boolean{
897 return this.isPlayListRepeat;
898 }
899
900 private function windowResized(event:NativeWindowBoundsEvent):void{
901 lastRect = event.afterBounds;
902 }
903
904 private function windowMove(event:NativeWindowBoundsEvent):void{
905 lastRect = event.afterBounds;
906 }
907
908 public function playListDoubleClicked():void{
909 if(playListProvider.length > 0){
910 var url:String = videoUrlMap[playListProvider[dataGrid_playList.selectedIndex]];
911 playerController.initForVideoPlayer(url, dataGrid_playList.selectedIndex);
912 }
913 }
914
915 /**
916 * ���������������������������������������������������������������������������������������������������
917 *
918 */
919 public function selectComment(no:Number):void{
920
921 for(var i:int = 0; i<commentListProvider.length; i++){
922 if(commentListProvider[i].no_column == no){
923 (dataGrid_comment as DataGrid).selectedIndex = i;
924
925 return;
926 }
927 }
928
929 }
930
931 private function readStore():void{
932
933 try{
934 /*���������������������������������������������*/
935
936 var confValue:String = null;
937 confValue = ConfigManager.getInstance().getItem("isPlayListRepeat");
938 if (confValue == null) {
939 //���������������
940 }else{
941 isPlayListRepeat = ConfUtil.parseBoolean(confValue);
942 }
943
944 confValue = ConfigManager.getInstance().getItem("isSyncComment");
945 if (confValue == null) {
946 //���������������
947 }else{
948 isSyncComment = ConfUtil.parseBoolean(confValue);
949 }
950
951 confValue = ConfigManager.getInstance().getItem("isPlayerFollow");
952 if (confValue == null) {
953 //���������������
954 }else{
955 isPlayerFollow = ConfUtil.parseBoolean(confValue);
956 }
957
958 confValue = ConfigManager.getInstance().getItem("isRenewCommentEachPlay");
959 if (confValue == null) {
960 //���������������
961 }else{
962 isRenewCommentEachPlay = ConfUtil.parseBoolean(confValue);
963 }
964
965 confValue = ConfigManager.getInstance().getItem("isResizePlayerEachPlay");
966 if (confValue == null) {
967 //���������������
968 }else{
969 isResizePlayerEachPlay = ConfUtil.parseBoolean(confValue);
970 }
971
972 confValue = ConfigManager.getInstance().getItem("isHideUnderController");
973 if (confValue == null) {
974 //���������������
975 }else{
976 isHideUnderController = ConfUtil.parseBoolean(confValue);
977 }
978
979 confValue = ConfigManager.getInstance().getItem("commentScale");
980 if (confValue == null) {
981 //���������������
982 }else{
983 commentScale = Number(confValue);
984 }
985
986 confValue = ConfigManager.getInstance().getItem("commentFps");
987 if (confValue == null) {
988 //���������������
989 }else{
990 this.fps = Number(confValue);
991 this.playerController.changeFps(this.fps);
992 }
993
994 confValue = ConfigManager.getInstance().getItem("isShowOnlyPermissionComment");
995 if (confValue == null) {
996 //���������������
997 }else{
998 isShowOnlyPermissionComment = ConfUtil.parseBoolean(confValue);
999 }
1000
1001 confValue = ConfigManager.getInstance().getItem("showCommentCount");
1002 if (confValue == null) {
1003 //���������������
1004 }else{
1005 showCommentCountPerMin = int(confValue);
1006 }
1007
1008 confValue = ConfigManager.getInstance().getItem("showOwnerCommentCount");
1009 if (confValue == null) {
1010 showOwnerCommentCountPerMin = showCommentCountPerMin;
1011 }else{
1012 showOwnerCommentCountPerMin = int(confValue);
1013 }
1014
1015 confValue = ConfigManager.getInstance().getItem("showCommentSec");
1016 if (confValue == null) {
1017 //���������������
1018 }else{
1019 showCommentSec = int(confValue);
1020 }
1021
1022 confValue = ConfigManager.getInstance().getItem("isRenewOtherCommentWithCommentEachPlay");
1023 if (confValue == null) {
1024 //���������������
1025 }else{
1026 isRenewOtherCommentWithCommentEachPlay = ConfUtil.parseBoolean(confValue);
1027 }
1028
1029 confValue = ConfigManager.getInstance().getItem("isAntiAlias");
1030 if (confValue == null) {
1031 //���������������
1032 }else{
1033 isAntiAlias = ConfUtil.parseBoolean(confValue);
1034 }
1035
1036 confValue = ConfigManager.getInstance().getItem("commentAlpha");
1037 if (confValue == null) {
1038 //���������������
1039 }else{
1040 commentAlpha = int(confValue);
1041 }
1042
1043 confValue = ConfigManager.getInstance().getItem("isEnableJump");
1044 if (confValue == null) {
1045 //���������������
1046 }else{
1047 isEnableJump = ConfUtil.parseBoolean(confValue);
1048 }
1049
1050 confValue = ConfigManager.getInstance().getItem("isAskToUserOnJump");
1051 if (confValue == null) {
1052 //���������������
1053 }else{
1054 isAskToUserOnJump = ConfUtil.parseBoolean(confValue);
1055 }
1056
1057 confValue = ConfigManager.getInstance().getItem("isInfoViewAlwaysFront");
1058 if (confValue == null) {
1059 //���������������
1060 }else{
1061 isInfoViewAlwaysFront = ConfUtil.parseBoolean(confValue);
1062 }
1063
1064 confValue = ConfigManager.getInstance().getItem("selectedResizeType");
1065 if (confValue == null) {
1066 //���������������
1067 }else{
1068 selectedResizeType = int(confValue);
1069 }
1070
1071 confValue = ConfigManager.getInstance().getItem("isCommentFontBold");
1072 if (confValue == null) {
1073 //���������������
1074 }else{
1075 isCommentFontBold = ConfUtil.parseBoolean(confValue);
1076 }
1077
1078 confValue = ConfigManager.getInstance().getItem("isShowAlwaysNicowariArea");
1079 if (confValue == null) {
1080 //���������������
1081 }else{
1082 isShowAlwaysNicowariArea = ConfUtil.parseBoolean(confValue);
1083 }
1084
1085 confValue = ConfigManager.getInstance().getItem("isHideTagArea");
1086 if (confValue == null) {
1087 //���������������
1088 }else{
1089 isHideTagArea = ConfUtil.parseBoolean(confValue);
1090 }
1091
1092 confValue = ConfigManager.getInstance().getItem("isAlwaysEconomyForStreaming");
1093 if (confValue == null) {
1094 //���������������
1095 }else{
1096 isAlwaysEconomyForStreaming = ConfUtil.parseBoolean(confValue);
1097 }
1098
1099 confValue = ConfigManager.getInstance().getItem("isAppendComment");
1100 if (confValue == null) {
1101 //���������������
1102 }else{
1103 isAppendComment = ConfUtil.parseBoolean(confValue);
1104 }
1105
1106 confValue = ConfigManager.getInstance().getItem("isHideSekaShinComment");
1107 if (confValue == null) {
1108 //���������������
1109 }else{
1110 isHideSekaShinComment = ConfUtil.parseBoolean(confValue);
1111 }
1112
1113 confValue = ConfigManager.getInstance().getItem("isShowHTMLOwnerComment");
1114 if (confValue == null) {
1115 //���������������
1116 }else{
1117 isShowHTMLOwnerComment = ConfUtil.parseBoolean(confValue);
1118 }
1119
1120 //x,y,w,h
1121 confValue = ConfigManager.getInstance().getItem("controllerWindowPosition_x");
1122 var controllerPosition_x:Number = 0;
1123 if (confValue == null) {
1124 //���������������
1125 }else{
1126 controllerPosition_x = Number(confValue);
1127 this.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{
1128 nativeWindow.x = lastRect.x = controllerPosition_x;
1129 });
1130 }
1131
1132 confValue = ConfigManager.getInstance().getItem("controllerWindowPosition_y");
1133 var controllerPosition_y:Number = 0;
1134 if (confValue == null) {
1135 //���������������
1136 }else{
1137 controllerPosition_y = Number(confValue);
1138 this.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{
1139 nativeWindow.y = lastRect.y = controllerPosition_y;
1140 });
1141 }
1142
1143 confValue = ConfigManager.getInstance().getItem("controllerWindowPosition_w");
1144 var controllerPosition_w:Number = 380;
1145 if (confValue == null) {
1146 //���������������
1147 }else{
1148 controllerPosition_w = Number(confValue);
1149 this.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{
1150 nativeWindow.width = lastRect.width = controllerPosition_w;
1151 });
1152 }
1153
1154 confValue = ConfigManager.getInstance().getItem("controllerWindowPosition_h");
1155 var controllerPosition_h:Number = 520;
1156 if (confValue == null) {
1157 //���������������
1158 }else{
1159 controllerPosition_h = Number(confValue);
1160 this.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{
1161 nativeWindow.height = lastRect.height = controllerPosition_h;
1162 });
1163 }
1164
1165 confValue = ConfigManager.getInstance().getItem("isEnableWideMode");
1166 if(confValue == null){
1167 //���������������
1168 isEnableWideMode = true;
1169 }else{
1170 isEnableWideMode = ConfUtil.parseBoolean(confValue);
1171 }
1172
1173 confValue = ConfigManager.getInstance().getItem("useOldVersionVideoSize");
1174 if (confValue == null)
1175 {
1176 useOldVersionVideoSize = false;
1177 }else
1178 {
1179 useOldVersionVideoSize = ConfUtil.parseBoolean(confValue);
1180 }
1181 playerController.isUseOldVersionVideoSize(useOldVersionVideoSize);
1182
1183
1184 confValue = ConfigManager.getInstance().getItem("relationSortIndex");
1185 if(confValue == null){
1186 //���������������
1187 }else{
1188 relationSortIndex = int(confValue);
1189 }
1190
1191 confValue = ConfigManager.getInstance().getItem("relationOrderIndex");
1192 if(confValue == null){
1193 //���������������
1194 }else{
1195 relationOrderIndex = int(confValue);
1196 }
1197
1198 confValue = ConfigManager.getInstance().getItem("isNgUpEnable");
1199 if(confValue == null){
1200 // ���������������
1201 }else{
1202 isNgUpEnable = ConfUtil.parseBoolean(confValue);
1203 }
1204
1205 confValue = ConfigManager.getInstance().getItem("isSmoothing");
1206 if(confValue != null){
1207 isSmoothing = ConfUtil.parseBoolean(confValue);
1208 }
1209 if(playerController != null){
1210 playerController.setVideoSmoothing(this.isSmoothing);
1211 }
1212
1213 confValue = ConfigManager.getInstance().getItem("isSmoothingOnlyNotPixelIdenticalDimensions");
1214 if(confValue != null){
1215 isSmoothingOnlyNotPixelIdenticalDimensions = ConfUtil.parseBoolean(confValue);
1216 }
1217
1218 confValue = ConfigManager.getInstance().getItem("playerQuality");
1219 if(confValue != null){
1220 playerQuality = int(confValue);
1221 }
1222 if(playerController != null){
1223 playerController.setPlayerQuality(this.playerQuality);
1224 }
1225
1226 confValue = ConfigManager.getInstance().getItem("isEnableWideMode");
1227 if(confValue != null){
1228 isEnableWideMode = ConfUtil.parseBoolean(confValue);
1229 }
1230
1231 confValue = ConfigManager.getInstance().getItem("isFollowInfoViewHeight");
1232 if (confValue != null)
1233 {
1234 isFollowInfoViewHeight = ConfUtil.parseBoolean(confValue);
1235 }
1236
1237 confValue = ConfigManager.getInstance().getItem("isNotPlayNicowari");
1238 if (confValue != null)
1239 {
1240 isNotPlayNicowari = ConfUtil.parseBoolean(confValue);
1241 }
1242
1243 confValue = ConfigManager.getInstance().getItem("isOpenFileDialogWhenOpenPlayer");
1244 if (confValue != null)
1245 {
1246 this.isOpenFileDialogWhenOpenPlayer = ConfUtil.parseBoolean(confValue);
1247 }
1248
1249 confValue = ConfigManager.getInstance().getItem("is184");
1250 if (confValue != null)
1251 {
1252 this.is184 = ConfUtil.parseBoolean(confValue);
1253 }
1254
1255 confValue = ConfigManager.getInstance().getItem("useDarkColor");
1256 if (confValue != null)
1257 {
1258 this.useDarkColor = ConfUtil.parseBoolean(confValue);
1259 }
1260
1261 confValue = ConfigManager.getInstance().getItem("ownerCommentTextSize");
1262 if (confValue != null)
1263 {
1264 var height:int = int(confValue);
1265
1266 if (height >= 0) {
1267 this.ownerCommentTextSize = height;
1268 }
1269 }
1270
1271 }catch(error:Error){
1272 trace(error.getStackTrace());
1273 Alert.show(Message.M_CONF_FILE_IS_BROKEN, Message.M_ERROR);
1274 logManager.addLog(Message.FAIL_LOAD_CONF_FILE_FOR_VIDEO_INFO_VIEW + ":" + Message.M_CONF_FILE_IS_BROKEN + ":" + ConfigManager.getInstance().confFileNativePath + ":" + error);
1275 }
1276
1277 }
1278
1279 public function saveStore():void{
1280
1281 try{
1282
1283 trace("saveStore_videoInfoView");
1284
1285 /*������������������������������������*/
1286 ConfigManager.getInstance().removeItem("isPlayListRepeat");
1287 ConfigManager.getInstance().setItem("isPlayListRepeat", isPlayListRepeat);
1288
1289 ConfigManager.getInstance().removeItem("isSyncComment");
1290 ConfigManager.getInstance().setItem("isSyncComment", isSyncComment);
1291
1292 ConfigManager.getInstance().removeItem("isPlayerFollow");
1293 ConfigManager.getInstance().setItem("isPlayerFollow", isPlayerFollow);
1294
1295 ConfigManager.getInstance().removeItem("isRenewCommentEachPlay");
1296 ConfigManager.getInstance().setItem("isRenewCommentEachPlay", isRenewCommentEachPlay);
1297
1298 ConfigManager.getInstance().removeItem("isResizePlayerEachPlay");
1299 ConfigManager.getInstance().setItem("isResizePlayerEachPlay", isResizePlayerEachPlay);
1300
1301 ConfigManager.getInstance().removeItem("isHideUnderController");
1302 ConfigManager.getInstance().setItem("isHideUnderController", isHideUnderController);
1303
1304 // ������������������������������������
1305 ConfigManager.getInstance().removeItem("controllerWindowPosition_x");
1306 ConfigManager.getInstance().setItem("controllerWindowPosition_x", lastRect.x);
1307
1308 ConfigManager.getInstance().removeItem("controllerWindowPosition_y");
1309 ConfigManager.getInstance().setItem("controllerWindowPosition_y", lastRect.y);
1310
1311 ConfigManager.getInstance().removeItem("controllerWindowPosition_w");
1312 ConfigManager.getInstance().setItem("controllerWindowPosition_w", lastRect.width);
1313
1314 ConfigManager.getInstance().removeItem("controllerWindowPosition_h");
1315 ConfigManager.getInstance().setItem("controllerWindowPosition_h", lastRect.height);
1316
1317 ConfigManager.getInstance().removeItem("commentScale");
1318 ConfigManager.getInstance().setItem("commentScale", commentScale);
1319
1320 ConfigManager.getInstance().removeItem("commentFps");
1321 ConfigManager.getInstance().setItem("commentFps", fps);
1322
1323 ConfigManager.getInstance().removeItem("isShowOnlyPermissionComment");
1324 ConfigManager.getInstance().setItem("isShowOnlyPermissionComment", isShowOnlyPermissionComment);
1325
1326 ConfigManager.getInstance().removeItem("showCommentCount");
1327 ConfigManager.getInstance().setItem("showCommentCount", showCommentCountPerMin);
1328
1329 ConfigManager.getInstance().removeItem("showOwnerCommentCount");
1330 ConfigManager.getInstance().setItem("showOwnerCommentCount", showOwnerCommentCountPerMin);
1331
1332 ConfigManager.getInstance().removeItem("showCommentSec");
1333 ConfigManager.getInstance().setItem("showCommentSec", showCommentSec);
1334
1335 ConfigManager.getInstance().removeItem("isRenewOtherCommentWithCommentEachPlay");
1336 ConfigManager.getInstance().setItem("isRenewOtherCommentWithCommentEachPlay", isRenewOtherCommentWithCommentEachPlay);
1337
1338 ConfigManager.getInstance().removeItem("isAntiAlias");
1339 ConfigManager.getInstance().setItem("isAntiAlias", isAntiAlias);
1340
1341 ConfigManager.getInstance().removeItem("commentAlpha");
1342 ConfigManager.getInstance().setItem("commentAlpha", commentAlpha);
1343
1344 ConfigManager.getInstance().removeItem("isEnableJump");
1345 ConfigManager.getInstance().setItem("isEnableJump", isEnableJump);
1346
1347 ConfigManager.getInstance().removeItem("isAskToUserOnJump");
1348 ConfigManager.getInstance().setItem("isAskToUserOnJump", isAskToUserOnJump);
1349
1350 ConfigManager.getInstance().removeItem("isInfoViewAlwaysFront");
1351 ConfigManager.getInstance().setItem("isInfoViewAlwaysFront", isInfoViewAlwaysFront);
1352
1353 ConfigManager.getInstance().removeItem("selectedResizeType");
1354 ConfigManager.getInstance().setItem("selectedResizeType", selectedResizeType);
1355
1356 ConfigManager.getInstance().removeItem("isCommentFontBold");
1357 ConfigManager.getInstance().setItem("isCommentFontBold", isCommentFontBold);
1358
1359 ConfigManager.getInstance().removeItem("isShowAlwaysNicowariArea");
1360 ConfigManager.getInstance().setItem("isShowAlwaysNicowariArea", isShowAlwaysNicowariArea);
1361
1362 ConfigManager.getInstance().removeItem("isAlwaysEconomyForStreaming");
1363 ConfigManager.getInstance().setItem("isAlwaysEconomyForStreaming", isAlwaysEconomyForStreaming);
1364
1365 ConfigManager.getInstance().removeItem("isHideTagArea");
1366 ConfigManager.getInstance().setItem("isHideTagArea", isHideTagArea);
1367
1368 ConfigManager.getInstance().removeItem("isAppendComment");
1369 ConfigManager.getInstance().setItem("isAppendComment", isAppendComment);
1370
1371 ConfigManager.getInstance().removeItem("isHideSekaShinComment");
1372 ConfigManager.getInstance().setItem("isHideSekaShinComment", isHideSekaShinComment);
1373
1374 ConfigManager.getInstance().removeItem("isShowHTMLOwnerComment");
1375 ConfigManager.getInstance().setItem("isShowHTMLOwnerComment", isShowHTMLOwnerComment);
1376
1377 ConfigManager.getInstance().removeItem("relationSortIndex");
1378 ConfigManager.getInstance().setItem("relationSortIndex", relationSortIndex);
1379
1380 ConfigManager.getInstance().removeItem("relationOrderIndex");
1381 ConfigManager.getInstance().setItem("relationSortIndex", relationSortIndex);
1382
1383 ConfigManager.getInstance().removeItem("isNgUpEnable");
1384 ConfigManager.getInstance().setItem("isNgUpEnable", isNgUpEnable);
1385
1386 ConfigManager.getInstance().removeItem("isSmoothing");
1387 ConfigManager.getInstance().setItem("isSmoothing",isSmoothing);
1388
1389 ConfigManager.getInstance().removeItem("isSmoothingOnlyNotPixelIdenticalDimensions");
1390 ConfigManager.getInstance().setItem("isSmoothingOnlyNotPixelIdenticalDimensions", isSmoothingOnlyNotPixelIdenticalDimensions);
1391
1392 ConfigManager.getInstance().removeItem("playerQuality");
1393 ConfigManager.getInstance().setItem("playerQuality", playerQuality);
1394
1395 ConfigManager.getInstance().removeItem("isEnableWideMode");
1396 ConfigManager.getInstance().setItem("isEnableWideMode", isEnableWideMode);
1397
1398 ConfigManager.getInstance().removeItem("useOldVersionVideoSize");
1399 ConfigManager.getInstance().setItem("useOldVersionVideoSize", useOldVersionVideoSize);
1400
1401 ConfigManager.getInstance().removeItem("isFollowInfoViewHeight");
1402 ConfigManager.getInstance().setItem("isFollowInfoViewHeight", isFollowInfoViewHeight);
1403
1404 ConfigManager.getInstance().removeItem("isNotPlayNicowari");
1405 ConfigManager.getInstance().setItem("isNotPlayNicowari", isNotPlayNicowari);
1406
1407
1408 /* DataGrid��������������� */
1409 if (dataGrid_comment != null)
1410 {
1411 DataGridColumnWidthUtil.save(dataGrid_comment, new Vector.<String>("mail_column"));
1412 }
1413
1414 if (dataGrid_oldComment != null)
1415 {
1416 DataGridColumnWidthUtil.save(dataGrid_oldComment, new Vector.<String>("mail_column"));
1417 }
1418
1419 ConfigManager.getInstance().removeItem("isOpenFileDialogWhenOpenPlayer");
1420 ConfigManager.getInstance().setItem("isOpenFileDialogWhenOpenPlayer", isOpenFileDialogWhenOpenPlayer);
1421
1422 ConfigManager.getInstance().removeItem("is184");
1423 ConfigManager.getInstance().setItem("is184", is184);
1424
1425 ConfigManager.getInstance().removeItem("useDarkColor");
1426 ConfigManager.getInstance().setItem("useDarkColor", useDarkColor);
1427
1428 ConfigManager.getInstance().removeItem("ownerCommentTextSize");
1429 ConfigManager.getInstance().setItem("ownerCommentTextSize", ownerCommentTextSize);
1430
1431 ConfigManager.getInstance().save();
1432
1433 }catch(error:Error){
1434 Alert.show(Message.M_CONF_FILE_IS_BROKEN, Message.M_ERROR);
1435 logManager.addLog(Message.FAIL_SAVE_CONF_FILE_FOR_VIDEO_INFO_VIEW + ":" + Message.M_CONF_FILE_IS_BROKEN + ":" + ConfigManager.getInstance().confFileNativePath + ":" + error);
1436 trace(error.getStackTrace());
1437 }
1438
1439 }
1440
1441 public function resetWindowPosition():void{
1442 // ������������������������������������
1443 try{
1444
1445 // ������������������������������������������������������������
1446 ConfigManager.getInstance().removeItem("controllerWindowPosition_x");
1447 ConfigManager.getInstance().setItem("controllerWindowPosition_x", 0);
1448
1449 ConfigManager.getInstance().removeItem("controllerWindowPosition_y");
1450 ConfigManager.getInstance().setItem("controllerWindowPosition_y", 0);
1451
1452 ConfigManager.getInstance().removeItem("controllerWindowPosition_w");
1453 ConfigManager.getInstance().setItem("controllerWindowPosition_w", 400);
1454
1455 ConfigManager.getInstance().removeItem("controllerWindowPosition_h");
1456 ConfigManager.getInstance().setItem("controllerWindowPosition_h", 580);
1457
1458 ConfigManager.getInstance().save();
1459
1460 this.readStore();
1461
1462 }catch(error:Error){
1463 Alert.show(Message.M_CONF_FILE_IS_BROKEN, Message.M_ERROR);
1464 logManager.addLog(Message.FAIL_SAVE_CONF_FILE_FOR_VIDEO_INFO_VIEW + ":" + Message.M_CONF_FILE_IS_BROKEN + ":" + ConfigManager.getInstance().confFileNativePath + ":" + error);
1465 trace(error.getStackTrace());
1466 }
1467
1468 if(this.nativeWindow != null && !(this as Window).closed){
1469
1470 this.visible = true;
1471
1472 this.nativeWindow.x = 0;
1473 this.nativeWindow.y = 0;
1474
1475 this.width = 380;
1476 this.height = 520;
1477 }
1478 }
1479
1480 /**
1481 *
1482 * @param urlList
1483 * @param videoNameList
1484 * @param playListName
1485 */
1486 public function setPlayList(urlList:Array, videoNameList:Array, playListName:String):void{
1487
1488 this.playListName = playListName;
1489 label_playListTitle_dataProvider = playListName;
1490
1491 for each(var title:String in videoNameList){
1492 playListProvider.addItem(title);
1493 }
1494
1495 for(var index:int = 0; index<urlList.length; index++){
1496 videoUrlMap[videoNameList[index]] = urlList[index];
1497 }
1498
1499 if(this.dataGrid_playList != null){
1500 // (dataGrid_playList as DataGrid).validateDisplayList();
1501 }
1502 }
1503
1504 /**
1505 *
1506 * @param url
1507 * @param title
1508 *
1509 */
1510 public function addPlayListItem(url:String, title:String):void{
1511
1512 videoUrlMap[title] = url;
1513
1514 }
1515
1516 /**
1517 *
1518 * @param url
1519 * @param title
1520 * @param index
1521 *
1522 */
1523 public function addPlayListItemWithList(url:String, title:String, index:int):void{
1524 playListProvider.addItemAt(title,index);
1525
1526 addPlayListItem(url, title);
1527
1528 if(this.dataGrid_playList != null){
1529 (dataGrid_playList as DataGrid).dataProvider = playListProvider;
1530 (dataGrid_playList as DataGrid).validateDisplayList();
1531 }
1532
1533 }
1534
1535
1536 /**
1537 *
1538 * @param title
1539 * @param index
1540 *
1541 */
1542 public function removePlayListItem(index:int):void{
1543 var title:String = String(playListProvider.removeItemAt(index));
1544
1545 //���������������������������������������������������������������
1546 for each(var videoName:String in playListProvider){
1547 if(title == videoName){
1548 //������������������videoUrlMap���������������������
1549 return;
1550 }
1551 }
1552 //���������������������videoUrlMap������������
1553 videoUrlMap[title] = null;
1554
1555 if(this.dataGrid_playList != null){
1556 (dataGrid_playList as DataGrid).dataProvider = playListProvider;
1557 (dataGrid_playList as DataGrid).validateDisplayList();
1558 }
1559 }
1560
1561 /**
1562 *
1563 * @return
1564 *
1565 */
1566 public function getPlayList():Array{
1567 var array:Array = new Array();
1568 for(var i:int = 0; i<playListProvider.length; i++){
1569 array.push(String(playListProvider[i]));
1570 }
1571
1572 var returnArray:Array = new Array();
1573
1574 for each(var title:String in array){
1575 returnArray.push(videoUrlMap[title]);
1576 }
1577
1578 return returnArray;
1579 }
1580
1581 /**
1582 * ���������������������������������������������������������������
1583 * @return
1584 *
1585 */
1586 public function getNameList():Array{
1587 var array:Array = new Array();
1588 for(var i:int = 0; i<playListProvider.length; i++){
1589 array.push(String(playListProvider[i]));
1590 }
1591
1592 return array;
1593 }
1594
1595 /**
1596 *
1597 *
1598 */
1599 public function resetPlayList():void{
1600 this.playListName = "";
1601 this.label_playListTitle_dataProvider = playListName;
1602
1603 videoUrlMap = new Object();
1604
1605 playListProvider.removeAll();
1606
1607 if(this.dataGrid_playList != null){
1608 (dataGrid_playList as DataGrid).dataProvider = playListProvider;
1609 (dataGrid_playList as DataGrid).validateDisplayList();
1610 (dataGrid_playList as DataGrid).validateNow();
1611 }
1612 }
1613
1614 /**
1615 * ���������������������������������������������
1616 *
1617 * @details edvakf���������������������������
1618 * @see https://github.com/edvakf/NNDDMOD/commit/6984ba8919727a98c249e1bc8a4848705de27df5
1619 */
1620 public function shufflePlayList():void{
1621
1622 var selectedObject:Object = null;
1623 if (dataGrid_playList != null)
1624 {
1625 selectedObject = dataGrid_playList.selectedItem;
1626 }
1627
1628 var tempArrayCollection:ArrayCollection = new ArrayCollection();
1629 for each(var object:Object in playListProvider){
1630 tempArrayCollection.addItem(object);
1631 }
1632 var i:int = tempArrayCollection.length;
1633 while (--i) {
1634 var j:int = Math.floor( Math.random() * (i + 1) );
1635 if (i == j) {
1636 continue;
1637 }
1638 var object:Object = tempArrayCollection.getItemAt(i);
1639 tempArrayCollection.setItemAt( tempArrayCollection.getItemAt(j), i );
1640 tempArrayCollection.setItemAt( object, j );
1641 }
1642 playListProvider = tempArrayCollection;
1643
1644 if (dataGrid_playList != null && selectedObject != null)
1645 {
1646 dataGrid_playList.selectedItem = selectedObject;
1647 }
1648 }
1649
1650 /**
1651 *
1652 * @param index
1653 * @return
1654 *
1655 */
1656 public function getPlayListUrl(index:int):String{
1657 var videoTitle:String = playListProvider[index];
1658
1659 return videoUrlMap[videoTitle];
1660 }
1661
1662 /**
1663 *
1664 * @param event
1665 *
1666 */
1667 public function playListDragDropHandler(event:DragEvent):void{
1668 if(event.dragInitiator == dataGrid_playList){
1669
1670 //���������������(������������������������������������������)
1671
1672 }else{
1673
1674 //DataGrid���������Drag������������������������������
1675
1676 if(event.dragInitiator as DataGrid){
1677 var selectedItems:Array = (event.dragInitiator as DataGrid).selectedItems;
1678 var addItems:Array = new Array();
1679
1680 for(var i:int=0; i<selectedItems.length; i++){
1681
1682 //������������������������
1683 var url:String = selectedItems[i].dataGridColumn_videoPath;
1684 if(url == null || url == ""){
1685 //��������������� or ���������videoPath���������������������
1686 url = selectedItems[i].dataGridColumn_nicoVideoUrl;
1687
1688 if(url == null || url == ""){
1689 //������������������������������
1690 url = selectedItems[i].dataGridColumn_videoLocalPath;
1691
1692 if(url == null || url == ""){
1693 //������������������videoLocalPath���������������������
1694 url = selectedItems[i].dataGridColumn_videoUrl;
1695
1696 if(url == null || url == ""){
1697 //������������������������
1698 continue;
1699 }
1700 }
1701 }
1702 }
1703
1704 var title:String = selectedItems[i].dataGridColumn_videoName;
1705 var index:int = title.indexOf("\n");
1706 if(index != -1){
1707 //������������������������������������������������������������������������
1708 title = title.substring(0, index);
1709 }
1710
1711 addItems.push(title);
1712 addPlayListItem(url, title);
1713 }
1714
1715 }
1716
1717 event.dragSource = new DragSource();
1718 event.dragSource.addData(addItems, "items");
1719 }
1720 }
1721
1722 /**
1723 *
1724 * @param event
1725 *
1726 */
1727 public function playListClearButtonClicked(event:MouseEvent):void{
1728 resetPlayList();
1729 }
1730
1731 public function playListShuffleButtonClicked(event:MouseEvent):void{
1732 shufflePlayList();
1733 }
1734
1735 /**
1736 *
1737 * @param event
1738 *
1739 */
1740 public function playListItemDeleteButtonClicked(event:MouseEvent):void{
1741 var selectedIndices:Array = (dataGrid_playList as DataGrid).selectedIndices;
1742
1743 for(var index:int = selectedIndices.length; index != 0; index--){
1744 removePlayListItem(selectedIndices[index-1]);
1745 }
1746 }
1747
1748 /**
1749 *
1750 * @param event
1751 *
1752 */
1753 public function playListSaveButtonClicked(event:MouseEvent):void{
1754 //1.���������������������������������������������������������or���������������
1755 //2.���������������������������������������������
1756 //3.������������������������������������
1757 var urlArray:Array = new Array();
1758 var nameArray:Array = new Array();
1759 for each(var name:String in playListProvider){
1760 urlArray.push(videoUrlMap[name]);
1761 nameArray.push(name);
1762 }
1763
1764 var isExist:Boolean = false;
1765 if(playListName != null){
1766 var playList:PlayList = PlayListManager.instance.isExist(playListName);
1767
1768 if(playList != null){
1769 isExist = true;
1770 }
1771 }
1772
1773 if(!isExist){
1774 // ���������������������������
1775 playerController.addNewPlayList(urlArray, nameArray);
1776 }else{
1777 FlexGlobals.topLevelApplication.activate();
1778 Alert.show("���������������������������(" + playListName + ")���������������������������\n���������������������������������������������������������������������������������������", Message.M_MESSAGE, Alert.YES | Alert.NO | Alert.CANCEL, null, function(event:CloseEvent):void{
1779 if(event.detail == Alert.YES){
1780 // ���������
1781 playerController.updatePlayList(playListName, urlArray, nameArray);
1782 }else if(event.detail == Alert.NO){
1783 // ���������������
1784 var title:String = playerController.addNewPlayList(urlArray, nameArray);
1785 label_playListTitle_dataProvider = title;
1786 }else{
1787
1788 }
1789 });
1790
1791 }
1792
1793 }
1794
1795 /**
1796 *
1797 * @param index
1798 *
1799 */
1800 public function showPlayingTitle(index:int):void{
1801 if(dataGrid_playList != null){
1802 (dataGrid_playList as DataGrid).scrollToIndex(index);
1803 (dataGrid_playList as DataGrid).selectedIndex = index;
1804 }else{
1805 canvas_playList.addEventListener(FlexEvent.CREATION_COMPLETE, function(event:FlexEvent):void{
1806 (dataGrid_playList as DataGrid).scrollToIndex(index);
1807 (dataGrid_playList as DataGrid).selectedIndex = index;
1808 });
1809 }
1810 }
1811
1812 /**
1813 *
1814 * @param event
1815 *
1816 */
1817 public function tagListDoubleClickEventHandler(event:ListEvent):void{
1818 if(event.itemRenderer.data != null){
1819 if(event.itemRenderer.data is String){
1820 var word:String = String(event.itemRenderer.data);
1821 Application.application.search(new SearchItem(word,
1822 SearchSortString.convertSortTypeFromIndex(4), NNDDSearchType.TAG, word));
1823 }
1824 }
1825 }
1826
1827 /**
1828 *
1829 * @param event
1830 *
1831 */
1832 public function button_goToWebClicked(event:Event):void{
1833 this.playerController.watchOnWeb();
1834 }
1835
1836 /**
1837 *
1838 * @param event
1839 *
1840 */
1841 public function tweet(event:Event):void{
1842 this.playerController.tweet();
1843 }
1844
1845 /**
1846 *
1847 * @param event
1848 *
1849 */
1850 public function addHatenaBookmark(event:Event):void{
1851 this.playerController.addHatenaBookmark();
1852 }
1853
1854 /**
1855 *
1856 * @param event
1857 *
1858 */
1859 public function openNicoSound(event:Event):void{
1860 this.playerController.openNicoSound();
1861 }
1862
1863 /**
1864 *
1865 * @param event
1866 *
1867 */
1868 public function button_addDownloadList(event:Event):void{
1869
1870 this.playerController.addDlList();
1871
1872 }
1873
1874 /**
1875 *
1876 * @param event
1877 *
1878 */
1879 public function myListAddButtonClicked(event:Event):void{
1880 var selectedItem:Object = comboBox_mylist.selectedItem;
1881
1882 if(selectedItem != null){
1883 var name:String = String(selectedItem);
1884 this.playerController.addMyList(myListMap[name]);
1885
1886 }else{
1887
1888 }
1889 }
1890
1891 /**
1892 *
1893 * @param myListNames
1894 * @param myListNums
1895 *
1896 */
1897 public function setMyLists(myListNames:Array, myListNums:Array):void{
1898
1899 var selectedIndex:int = comboBox_mylist.selectedIndex;
1900 var selectedName:String = myListDataProvider[selectedIndex];
1901
1902 myListDataProvider = new Array();
1903 for(var i:int = 0; i<myListNames.length; i++){
1904 myListMap[myListNames[i]] = myListNums[i];
1905 myListDataProvider[i] = myListNames[i];
1906 if(selectedName == myListDataProvider[i]){
1907 selectedIndex = i;
1908 }
1909 }
1910
1911 comboBox_mylist.dataProvider = myListDataProvider;
1912
1913 if(myListDataProvider.length >= 1){
1914 comboBox_mylist.selectedIndex = 0;
1915 }
1916
1917 comboBox_mylist.validateNow();
1918
1919 if(selectedIndex == -1){
1920 var value:Object = ConfigManager.getInstance().getItem("infoViewSelectedMyListIndex");
1921 if(value != null){
1922 selectedIndex = int(value);
1923 }else{
1924 selectedIndex = 0;
1925 }
1926 }
1927 comboBox_mylist.selectedIndex = selectedIndex;
1928
1929 }
1930
1931 private function ownerTextLinkClicked(event:TextEvent):void{
1932 if (event.text.indexOf("mylist/") != -1)
1933 {
1934 // trace(event.text);
1935 FlexGlobals.topLevelApplication.renewMyList(event.text);
1936 }else if (event.text.indexOf("channel/") != -1)
1937 {
1938 FlexGlobals.topLevelApplication.renewMyList(event.text);
1939 }else if (event.text.indexOf("watch/") != -1)
1940 {
1941 var videoId:String = PathMaker.getVideoID(event.text);
1942 // trace(videoId);
1943 playerController.playMovie("http://www.nicovideo.jp/watch/" + videoId);
1944 }else
1945 {
1946 trace(event);
1947 }
1948 }
1949
1950 private function playListReverseButtonClicked(event:Event):void{
1951 var tempArrayCollection:ArrayCollection = new ArrayCollection();
1952
1953 var newIndex:int = -1;
1954 if (dataGrid_playList != null)
1955 {
1956 var selectedIndex:int = dataGrid_playList.selectedIndex;
1957 if (selectedIndex != -1)
1958 {
1959 newIndex = (playListProvider.length-1) - selectedIndex;
1960 }
1961 }
1962
1963 for each(var object:Object in playListProvider){
1964 tempArrayCollection.addItemAt(object, 0);
1965 }
1966
1967 playListProvider = tempArrayCollection;
1968
1969 if (dataGrid_playList != null && newIndex != -1)
1970 {
1971 dataGrid_playList.selectedIndex = newIndex;
1972 }
1973 }
1974
1975 public function get playList():PlayList{
1976 var playList:PlayList = null;
1977
1978 if(getPlayList().length > 0){
1979
1980 playList = new PlayList();
1981
1982 playList.name = playListName;
1983
1984 for(var index:int = 0; index < (getPlayList() as Array).length; index++){
1985 var path:String = getPlayList()[index];
1986 var name:String = getNameList()[index];
1987 var nnddVideo:NNDDVideo = new NNDDVideo(path, name);
1988
1989 playList.items.push(nnddVideo);
1990 }
1991 }
1992
1993 return playList;
1994 }
1995
1996 public function setChangeFontSize(fontsize:int):void
1997 {
1998 if (fontsize == 10)
1999 {
2000 setRowHeight(22);
2001 }else if (fontsize == 11)
2002 {
2003 setRowHeight(22);
2004 }else if (fontsize == 12)
2005 {
2006 setRowHeight(24);
2007 }else if (fontsize >= 15)
2008 {
2009 setRowHeight(26);
2010 }
2011 }
2012
2013 private function setRowHeight(size:int):void
2014 {
2015 if (dataGrid_comment != null)
2016 {
2017 dataGrid_comment.rowHeight = size;
2018 }
2019 if (dataGrid_oldComment != null)
2020 {
2021 dataGrid_oldComment.rowHeight = size;
2022 }
2023 if (dataGrid_ownerComment != null)
2024 {
2025 dataGrid_ownerComment.rowHeight = size;
2026 }
2027 }
2028
2029

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26