예제 #1
0
        private void LinkEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (TemplateCombo.SelectedItem == null)
            {
                return;
            }

            ProfileTemplate template = (ProfileTemplate)TemplateCombo.SelectedItem;

            if (template.Inactive)
            {
                return;
            }

            // if ondisk, copy before editing
            if (template.OnDisk)
            {
                ProfileTemplate copy = new ProfileTemplate(false, false);
                copy.User = template.User + " (edited)";
                copy.User = copy.User.TrimStart(new char[] { ' ' });
                copy.Html = template.Html;

                template = copy;
            }

            EditTemplate edit = new EditTemplate(template, this);

            edit.ShowDialog(this);
        }
예제 #2
0
        private void LinkNew_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ProfileTemplate newTemplate = new ProfileTemplate(false, false);

            newTemplate.User = "******";
            newTemplate.Html = "";

            if (NewCount > 0)
            {
                newTemplate.User += " " + NewCount.ToString();
            }
            NewCount++;

            EditTemplate edit = new EditTemplate(newTemplate, this);

            edit.ShowDialog(this);
        }
예제 #3
0
        private void LinkNew_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ProfileTemplate newTemplate = new ProfileTemplate(false, false);
            newTemplate.User = "******";
            newTemplate.Html = "";

            if (NewCount > 0)
                newTemplate.User += " " + NewCount.ToString();
            NewCount++;

            EditTemplate edit = new EditTemplate(newTemplate, this);
            edit.ShowDialog(this);
        }
예제 #4
0
        private void LinkEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (TemplateCombo.SelectedItem == null)
                return;

            ProfileTemplate template = (ProfileTemplate)TemplateCombo.SelectedItem;
            if (template.Inactive)
                return;

            // if ondisk, copy before editing
            if (template.OnDisk)
            {
                ProfileTemplate copy = new ProfileTemplate(false, false);
                copy.User = template.User + " (edited)";
                copy.User = copy.User.TrimStart(new char[] { ' ' });
                copy.Html = template.Html;

                template = copy;
            }

            EditTemplate edit = new EditTemplate(template, this);
            edit.ShowDialog(this);
        }