public FormLog(LogManager.LogManager logManager) { InitializeComponent(); //非表示でもウィンドウハンドルを生成させる。さもなくば、Invokeが失敗する IntPtr wndHandle = Handle; lvBattle.DoubleBuffer(true); lvItem.DoubleBuffer(true); lvMaterials.DoubleBuffer(true); lvMission.DoubleBuffer(true); lvShip.DoubleBuffer(true); chartMaterial.DataSource = logManager.InitMaterialDataTable(); chartMaterial.DataBind(); /* フォームは開かれていないのでLoadは呼ばれないが、 * フォームが開かれる前にログ追加が行われるとデータの順番が腐る */ if (!Properties.Settings.Default.LogFormBounds.IsEmpty) { Bounds = Properties.Settings.Default.LogFormBounds; } lvBattle.LoadColumnWithOrder(Properties.Settings.Default.LogBattleColumnWidth); lvItem.LoadColumnWithOrder(Properties.Settings.Default.LogItemColumnWidth); lvMaterials.LoadColumnWithOrder(Properties.Settings.Default.LogMaterialColumnWidth); lvMission.LoadColumnWithOrder(Properties.Settings.Default.LogMissionColumnWidth); lvShip.LoadColumnWithOrder(Properties.Settings.Default.LogShipColumnWidth); logManager.AttachLogControls(lvShip, lvItem, lvBattle, lvMission, lvMaterials, chartMaterial, this); _logManager = logManager; Text += string.Format("(Store:{0})", logManager.LogStore.StoreType); var sm = new SystemMenu(this); sm.InsertMenuItem(3, "ウィンドウ復帰", 6); }
public FormLog(LogManager.LogManager logManager) { InitializeComponent(); //非表示でもウィンドウハンドルを生成させる。さもなくば、Invokeが失敗する IntPtr wndHandle = Handle; lvBattle.DoubleBuffer(true); lvItem.DoubleBuffer(true); lvMaterials.DoubleBuffer(true); lvMission.DoubleBuffer(true); lvShip.DoubleBuffer(true); chartMaterial.DataSource = logManager.InitMaterialDataTable(); chartMaterial.DataBind(); /* フォームは開かれていないのでLoadは呼ばれないが、 * フォームが開かれる前にログ追加が行われるとデータの順番が腐る */ if (!Properties.Settings.Default.LogFormBounds.IsEmpty) Bounds = Properties.Settings.Default.LogFormBounds; lvBattle.LoadColumnWithOrder(Properties.Settings.Default.LogBattleColumnWidth); lvItem.LoadColumnWithOrder(Properties.Settings.Default.LogItemColumnWidth); lvMaterials.LoadColumnWithOrder(Properties.Settings.Default.LogMaterialColumnWidth); lvMission.LoadColumnWithOrder(Properties.Settings.Default.LogMissionColumnWidth); lvShip.LoadColumnWithOrder(Properties.Settings.Default.LogShipColumnWidth); logManager.AttachLogControls(lvShip, lvItem, lvBattle, lvMission, lvMaterials,chartMaterial,this); _logManager = logManager; Text += string.Format("(Store:{0})", logManager.LogStore.StoreType); var sm = new SystemMenu(this); sm.InsertMenuItem(3, "ウィンドウ復帰", 6); }
// string _fiddlerOverrideGateway; /// <summary> /// コンストラクタ /// </summary> /// <param name="bPortable">設定を保存しない時true</param> public FormMain(bool bPortable) { InitializeComponent(); IntPtr ptr = Handle; _bPortable = bPortable; MouseWheel += FormMain_MouseWheel; MouseEnter += FormMain_MouseEnter; _sysProxy = System.Net.WebRequest.DefaultWebProxy; var asm = System.Reflection.Assembly.GetExecutingAssembly(); imageListSlotItemType.Images.AddStrip(new Bitmap( asm.GetManifestResourceStream("KCB2.SlotItemsSmallIcon.bmp"))); imageListSlotItemType.TransparentColor = Color.FromArgb(255, 0, 255); deckMemberList.SlotItemIconImageList = imageListSlotItemType; #if RESTORE_VOLUME ///起動時の音量設定を覚えておく using (var mixer = new MixerAPI()) { bootVol = mixer.Volume; bootMute = mixer.Mute; } #endif // WebRequestの同時処理数を引き上げる if (ServicePointManager.DefaultConnectionLimit < 20) { Debug.WriteLine(string.Format("ServicePointManager.DefaultConnectionLimit {0} -> 20", ServicePointManager.DefaultConnectionLimit)); ServicePointManager.DefaultConnectionLimit = 20; } //スレッドプール数を増やす int minWorkerThread, minCompletionPortThread; ThreadPool.GetMinThreads(out minWorkerThread, out minCompletionPortThread); Debug.WriteLine(string.Format("ManagedThread minWorkder:{0} minCompPortThread:{1}", minWorkerThread, minCompletionPortThread)); if (minWorkerThread < 20) { Debug.WriteLine(string.Format("minWorkerThread {0} -> 20", minWorkerThread)); ThreadPool.SetMinThreads(20, minCompletionPortThread); } _httProxy = new HTTProxy(); _httProxy.BeforeRequest += new HTTProxy.HTTProxyCallbackHandler(_httProxy_BeforeRequest); _httProxy.AfterSessionCompleted += new HTTProxy.HTTProxyCallbackHandler(_httProxy_AfterSessionCompleted); ///過去の設定を引っ張ってる場合。 if (Properties.Settings.Default.ProxyPort <= 0) Properties.Settings.Default.ProxyPort = 8088; _gsWrapper = new GSpread.SpreadSheetWrapper(); if (!_httProxy.Start(Properties.Settings.Default.ProxyPort)) MessageBox.Show("HttpListenerの起動に失敗しました。情報は取得されません。\n設定を確認してください"); else UpdateProxyConfiguration(); _logManager = new LogManager.LogManager(this); // _fiddlerOverrideGateway = Properties.Settings.Default.FiddlerOverrideGateway; #if !DEBUG if (Properties.Settings.Default.UseDevMenu) #endif { _watchSession = true; _logLastJSON = new RingBuffer<JSONData>(Properties.Settings.Default.SkipbackJSON+1); } deckMemberList.UpdateDeckStatus = UpdateDeckConditionTime; ///縦横切替を使うかどうか switchViewModeToolStripMenuItem.Visible = false; setLogStore(); }