public MainFormWorker(ref SingerWindow sw, ref AttributesWindow aw, ref TrackerWindow tw, ref UndoAbility ua) { this.sw = sw; this.aw = aw; this.tw = tw; this.ua = ua; tw.BindAttributeWindow(aw); sw.BindAttributeWindow(aw); tw.ShowingEditorChanged += tw_ShowingEditorChanged; tw.SelectingPartChanged += tw_SelectingPartChanged; tw.SelectingWavePartChanged += tw_SelectingWavePartChanged; tw.TotalTimePosChange += tw_TotalTimePosChange; tw.AfterTrackNormalize += tw_AfterTrackNormalize; sw.TotalTimePosChange += sw_TotalTimePosChange; sw.FormClosing += child_FormClosing; tw.FormClosing += child_FormClosing; aw.FormClosing += child_FormClosing; sw.BaseController.NoteActionEnd += BaseController_NoteActionEnd; //sw.BaseController. playworker.TimeChange += playworker_TimeChange; playworker.StatusChange += playworker_StatusChange; aw.ChannelVolumeChanged += aw_ChannelVolumeChanged; aw.GlobalVolumeChanged += aw_GlobalVolumeChanged; }
private void MainWindow_Load(object sender, EventArgs e) { Settings.Default.Upgrade(); attr = new AttributesWindow(); attr.inst = this; groupSettings.Enabled = false; groupAttributes.Enabled = false; Text = "TF2 Items Editor v2 build #" + System.Reflection.Assembly.GetEntryAssembly().GetName().Version.Revision; AttribOffsetX = Width - ClientSize.Width; AttribOffsetY = 0; string str = ""; stripTxt.Image = null; if (tabControl1.SelectedTab == tabItemsGame) { str = "File->Open->items_game.txt to open items_game.txt!"; stripTxt.Image = images.Images["Warning"]; } else if (tabControl1.SelectedTab == tabEnglish) { str = "File->Open->tf_english.txt to open tf_english.txt!"; stripTxt.Image = images.Images["Warning"]; } stripTxt.Text = str; if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun) { using (var form = new Changes()) { form.ShowDialog(); } } }
public UndoAbility(ref SingerWindow sw, ref AttributesWindow aw, ref TrackerWindow tw) { this.sw = sw; this.aw = aw; this.tw = tw; tw.ShowingEditorChanged += tw_ShowingEditorChanged; sw.BaseController.NoteActionBegin += BaseController_NoteActionBegin; sw.BaseController.NoteActionEnd += BaseController_NoteActionEnd; sw.BaseController.DynActionBegin += BaseController_DynActionBegin; sw.BaseController.DynActionEnd += BaseController_DynActionEnd; sw.BaseController.PitchActionBegin += BaseController_PitchActionBegin; sw.BaseController.PitchActionEnd += BaseController_PitchActionEnd; tw.BaseController.TrackerActionBegin += Track_View_TrackerActionBegin; tw.BaseController.TrackerActionEnd += Track_View_TrackerActionEnd; tw.BaseController.BeforeTrackNormalize += Track_View_BeforeTrackNormalize; tw.BaseController.AfterTrackNormalize += BaseController_AfterTrackNormalize; aw.AttributeChange += aw_AttributeChange; }