Exemplo n.º 1
0
        /// <summary>
        /// File > New plan...
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void miNewPlan_Click(object sender, EventArgs e)
        {
            // Request a new name for this plan
            using (NewPlanWindow npw = new NewPlanWindow())
            {
                DialogResult dr = npw.ShowDialog();
                if (dr == DialogResult.Cancel)
                {
                    return;
                }

                // Create the plan and add it
                Plan plan = new Plan(m_character)
                {
                    Name = npw.PlanName, Description = npw.PlanDescription
                };
                m_character.Plans.Add(plan);

                // Open a window for this plan
                PlanWindow.ShowPlanWindow(plan: plan);
            }

            Close();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Browses the form that opened this instance of EFTLoadout to
        /// the item that was double clicked in the TreeView.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">Arguments of the event.</param>
        private void tvLoadout_DoubleClick(object sender, EventArgs e)
        {
            Item item = ResultsTreeView.SelectedNode?.Tag as Item;

            PlanWindow.ShowPlanWindow(m_character, m_plan).ShowItemInBrowser(item);
        }