public OpenDeckMenuItem(PresenterModel model, DeckMarshalService marshal) { this.m_Model = model; this.m_OpenDeckDialog = new OpenDeckDialog(model, marshal); this.Text = Strings.OpenDeck; this.Shortcut = Shortcut.CtrlO; this.ShowShortcut = true; }
void ShowStartup(object sender, EventArgs ea) { //We only want this to be called the first time it's activated... look for a better event to use here. this.Activated -= this.ShowStartup; if (this.StandAlone) { this.m_StartupForm.StandaloneStartup(); } else { this.m_StartupForm.ShowDialog(); } if (this.OpenInputFiles != null) { foreach (string inputFile in this.OpenInputFiles) { if (inputFile != null && inputFile != "") { Decks.OpenDeckDialog odd = new OpenDeckDialog(this.m_Model, this.m_Marshal); odd.OpenDeck(new FileInfo(inputFile)); } } } }
void ShowStartup(object sender, EventArgs ea) { //We only want this to be called the first time it's activated... look for a better event to use here. this.Activated -= this.ShowStartup; this.m_StartupForm.ShowDialog(); // FIX BUG 827, 1009: Load any initial decks at this point (after we have connected) // We were doing this before we connected and so clients weren't getting the deck. if( this.OpenFromIconInputFile != null && this.OpenFromIconInputFile != "" ) { Decks.OpenDeckDialog odd = new OpenDeckDialog( this.m_Model, this.m_Marshal ); odd.OpenDeck( new FileInfo( this.OpenFromIconInputFile ) ); } }