コード例 #1
0
        public SaveAllDecksMenuItem(PresenterModel model, DeckMarshalService marshal)
        {
            this.m_Model = model;
            this.m_SaveDeckDialog = new SaveDeckDialog(model, marshal);

            this.Text = Strings.SaveAllDecks;
        }
コード例 #2
0
ファイル: SaveDeckDialog.cs プロジェクト: zhujingcheng/CP3
        public SaveOnCloseDialog(PresenterModel model, DeckMarshalService marshal, EventArgs ea)
        {
            this.m_Model          = model;
            this.m_Marshal        = marshal;
            this.m_SaveDeckDialog = new SaveDeckDialog(this.m_Model, this.m_Marshal);
            this.e               = ea;
            this.Cancel          = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            this.Size     = new Size(300, 110);
            this.Text     = "Classroom Presenter 3";
            this.Location = new Point(1000, 1000);

            Label label = new Label();

            label.Text     = Strings.ToSaveDeck;
            label.Location = new Point(10, 10);
            label.Size     = new Size(250, 20);
            this.Controls.Add(label);

            Button btnYes = new Button();

            btnYes.Parent       = this;
            btnYes.Text         = Strings.Yes;
            btnYes.Location     = new Point(20, 40);
            btnYes.DialogResult = DialogResult.OK;
            btnYes.Click       += new EventHandler(btnYes_Click);

            Button btnNo = new Button();

            btnNo.Parent       = this;
            btnNo.Text         = Strings.No;
            btnNo.Location     = new Point(100, 40);
            btnNo.DialogResult = DialogResult.Cancel;//??
            btnNo.Click       += new EventHandler(btnNo_Click);

            Button btnCancel = new Button();

            btnCancel.Parent       = this;
            btnCancel.Text         = Strings.Cancel;
            btnCancel.Location     = new Point(180, 40);
            btnCancel.DialogResult = DialogResult.Cancel;
            btnCancel.Click       += new EventHandler(btnCancel_Click);
        }
コード例 #3
0
        public SaveOnCloseDeckDialog(PresenterModel model, DeckMarshalService marshal, EventArgs ea)
        {
            this.m_Model          = model;
            this.m_Marshal        = marshal;
            this.m_SaveDeckDialog = new SaveDeckDialog(this.m_Model, this.m_Marshal);
            this.e      = ea;
            this.Cancel = false;

            this.Size     = new Size(300, 100);
            this.Text     = "Classroom Presenter";
            this.Location = new Point(1000, 1000);

            Label label = new Label();

            label.Text     = "Would you like to save your deck?";
            label.Location = new Point(10, 10);
            label.Size     = new Size(200, 20);
            this.Controls.Add(label);

            Button btnYes = new Button();

            btnYes.Parent       = this;
            btnYes.Text         = "Yes";
            btnYes.Location     = new Point(20, 40);
            btnYes.DialogResult = DialogResult.OK;
            btnYes.Click       += new EventHandler(btnYes_Click);

            Button btnNo = new Button();

            btnNo.Parent       = this;
            btnNo.Text         = "No";
            btnNo.Location     = new Point(100, 40);
            btnNo.DialogResult = DialogResult.Cancel;//??
            btnNo.Click       += new EventHandler(btnNo_Click);

            Button btnCancel = new Button();

            btnCancel.Parent       = this;
            btnCancel.Text         = "Cancel";
            btnCancel.Location     = new Point(180, 40);
            btnCancel.DialogResult = DialogResult.Cancel;
            btnCancel.Click       += new EventHandler(btnCancel_Click);
        }
コード例 #4
0
        public SaveOnCloseDialog(PresenterModel model, DeckMarshalService marshal, EventArgs ea)
        {
            this.m_Model = model;
            this.m_Marshal = marshal;
            this.m_SaveDeckDialog = new SaveDeckDialog(this.m_Model, this.m_Marshal);
            this.e = ea;
            this.Cancel = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            this.Size = new Size(300, 110);
            this.Text = "Classroom Presenter 3";
            this.Location = new Point(1000, 1000);

            Label label = new Label();
            label.Text = Strings.ToSaveDeck;
            label.Location = new Point(10, 10);
            label.Size = new Size(250, 20);
            this.Controls.Add(label);

            Button btnYes = new Button();
            btnYes.Parent = this;
            btnYes.Text = Strings.Yes;
            btnYes.Location = new Point(20, 40);
            btnYes.DialogResult = DialogResult.OK;
            btnYes.Click += new EventHandler(btnYes_Click);

            Button btnNo = new Button();
            btnNo.Parent = this;
            btnNo.Text = Strings.No;
            btnNo.Location = new Point(100, 40);
            btnNo.DialogResult = DialogResult.Cancel;//??
            btnNo.Click += new EventHandler(btnNo_Click);

            Button btnCancel = new Button();
            btnCancel.Parent = this;
            btnCancel.Text = Strings.Cancel;
            btnCancel.Location = new Point(180, 40);
            btnCancel.DialogResult = DialogResult.Cancel;
            btnCancel.Click += new EventHandler(btnCancel_Click);
        }
コード例 #5
0
        public SaveOnCloseDeckDialog(PresenterModel model, DeckMarshalService marshal, EventArgs ea)
        {
            this.m_Model = model;
            this.m_Marshal = marshal;
            this.m_SaveDeckDialog = new SaveDeckDialog(this.m_Model, this.m_Marshal);
            this.e = ea;
            this.Cancel = false;

            this.Size = new Size(300, 100);
            this.Text = "Classroom Presenter";
            this.Location = new Point(1000, 1000);

            Label label = new Label();
            label.Text = "Would you like to save your deck?";
            label.Location = new Point(10, 10);
            label.Size = new Size(200, 20);
            this.Controls.Add(label);

            Button btnYes = new Button();
            btnYes.Parent = this;
            btnYes.Text = "Yes";
            btnYes.Location = new Point(20, 40);
            btnYes.DialogResult = DialogResult.OK;
            btnYes.Click += new EventHandler(btnYes_Click);

            Button btnNo = new Button();
            btnNo.Parent = this;
            btnNo.Text = "No";
            btnNo.Location = new Point(100, 40);
            btnNo.DialogResult = DialogResult.Cancel;//??
            btnNo.Click += new EventHandler(btnNo_Click);

            Button btnCancel = new Button();
            btnCancel.Parent = this;
            btnCancel.Text = "Cancel";
            btnCancel.Location = new Point(180, 40);
            btnCancel.DialogResult = DialogResult.Cancel;
            btnCancel.Click += new EventHandler(btnCancel_Click);
        }
コード例 #6
0
        public SaveDeckMenuItem(PresenterModel model, DeckMarshalService marshal)
        {
            this.m_Model = model;
            this.m_SaveDeckDialog = new SaveDeckDialog(model, marshal);

            this.Text = Strings.SaveDeck;
            this.Shortcut = Shortcut.CtrlS;
            this.ShowShortcut = true;
        }