/// <summary> /// プラグインを後片付けする /// </summary> void IActPluginV1.DeInitPlugin() { try { Trace.WriteLine("DeInitPlugin begin."); // Windowの位置を保存する Settings.Default.OverlayTop = (int)MPTimerWindow.Default.Top; Settings.Default.OverlayLeft = (int)MPTimerWindow.Default.Left; Settings.Default.EnochianOverlayTop = (int)EnochianTimerWindow.Default.Top; Settings.Default.EnochianOverlayLeft = (int)EnochianTimerWindow.Default.Left; Settings.Default.Save(); FF14Watcher.Deinitialize(); MPTimerWindow.Default.Close(); EnochianTimerWindow.Default.Close(); this.PluginStatusLabel.Text = "Plugin Exited"; } catch (Exception ex) { Trace.WriteLine( "ACT.MPTimer 플러그인 종료 도중 에러가 발생했습니다." + Environment.NewLine + ex.ToString()); } finally { Trace.WriteLine("DeInitPlugin end."); Trace.Flush(); } }
/// <summary> /// プラグインを後片付けする /// </summary> void IActPluginV1.DeInitPlugin() { // Windowの位置を保存する Settings.Default.OverlayTop = (int)this.MPTimerWindow.Top; Settings.Default.OverlayLeft = (int)this.MPTimerWindow.Left; Settings.Default.Save(); FF14Watcher.Deinitialize(); this.MPTimerWindow.Close(); this.PluginStatusLabel.Text = "Plugin Exited"; }
/// <summary> /// Load /// </summary> /// <param name="sender">イベント発生元</param> /// <param name="e">イベント引数</param> private void ConfigPanel_Load(object sender, EventArgs e) { this.TargetJobComboBox.DataSource = Job.GetJobList(); this.TargetJobComboBox.ValueMember = "JobId"; this.TargetJobComboBox.DisplayMember = "JobName"; this.LoadSettings(); this.TekiyoButton.Click += (s1, e1) => { try { FF14Watcher.Deinitialize(); Settings.Default.OverlayTop = (int)MPTimerWindow.Default.Top; Settings.Default.OverlayLeft = (int)MPTimerWindow.Default.Left; Settings.Default.EnochianOverlayTop = (int)EnochianTimerWindow.Default.Top; Settings.Default.EnochianOverlayLeft = (int)EnochianTimerWindow.Default.Left; this.SaveSettings(); FF14Watcher.Default.UpdateTargetJobId(); MPTimerWindow.Reload(); MPTimerWindow.Default.Show(); EnochianTimerWindow.Reload(); EnochianTimerWindow.Default.Show(); Trace.WriteLine("Change settings."); } finally { FF14Watcher.Initialize(); } }; this.ShokikaButton.Click += (s1, e1) => { try { FF14Watcher.Deinitialize(); Settings.Default.Reset(); Settings.Default.Save(); MPTimerWindow.Default.Top = Settings.Default.OverlayTop; MPTimerWindow.Default.Left = Settings.Default.OverlayLeft; EnochianTimerWindow.Default.Top = Settings.Default.EnochianOverlayTop; EnochianTimerWindow.Default.Left = Settings.Default.EnochianOverlayLeft; this.LoadSettings(); FF14Watcher.Default.UpdateTargetJobId(); MPTimerWindow.Reload(); MPTimerWindow.Default.Show(); EnochianTimerWindow.Reload(); EnochianTimerWindow.Default.Show(); Trace.WriteLine("Reset settings."); } finally { FF14Watcher.Initialize(); } }; this.ProgressBarShiftColorButton.Click += (s1, e1) => { var button = s1 as Button; this.colorDialog.Color = button.BackColor; if (this.colorDialog.ShowDialog(this.ParentForm) == DialogResult.OK) { button.BackColor = this.colorDialog.Color; } }; this.ProgressBarShiftOutlineColorButton.Click += (s1, e1) => { var button = s1 as Button; this.colorDialog.Color = button.BackColor; if (this.colorDialog.ShowDialog(this.ParentForm) == DialogResult.OK) { button.BackColor = this.colorDialog.Color; } }; this.EnochianBarShiftColorButton.Click += (s1, e1) => { var button = s1 as Button; this.colorDialog.Color = button.BackColor; if (this.colorDialog.ShowDialog(this.ParentForm) == DialogResult.OK) { button.BackColor = this.colorDialog.Color; } }; this.EnochianBarShiftOutlineColorButton.Click += (s1, e1) => { var button = s1 as Button; this.colorDialog.Color = button.BackColor; if (this.colorDialog.ShowDialog(this.ParentForm) == DialogResult.OK) { button.BackColor = this.colorDialog.Color; } }; this.OverlayLocationXNumericUpDown.DataBindings.Add( new Binding("Value", MPTimerWindow.Default.ViewModel, "Left", false, DataSourceUpdateMode.OnPropertyChanged)); this.OverlayLocationYNumericUpDown.DataBindings.Add( new Binding("Value", MPTimerWindow.Default.ViewModel, "Top", false, DataSourceUpdateMode.OnPropertyChanged)); this.EnochianXNumericUpDown.DataBindings.Add( new Binding("Value", EnochianTimerWindow.Default.ViewModel, "Left", false, DataSourceUpdateMode.OnPropertyChanged)); this.EnochianYNumericUpDown.DataBindings.Add( new Binding("Value", EnochianTimerWindow.Default.ViewModel, "Top", false, DataSourceUpdateMode.OnPropertyChanged)); }