Exemplo n.º 1
0
        public void CreateProfile(Guid uniqueId, string friendlyName, Size tableSize, Corner origin, double maxFeedRate)
        {
            Profile profile = new Profile(uniqueId, friendlyName, tableSize, origin, maxFeedRate);

            profiles.Add(profile);
            profile.Modified += Profile_Modified;
            ProfileAdded?.Invoke(this, profile);
        }
Exemplo n.º 2
0
        private void saveNew(string name, string accessKeyId, string secretKey)
        {
            // Warn the user if they are about to overwrite an existing profile
            try {
                ProfileSettingsBase existing = ProfileManager.GetProfile(name);
                string       msg             = string.Format(DuplicateProfileText, name);
                DialogResult result          = MessageBox.Show(msg, DuplicateProfileCaption, MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
                if (result == DialogResult.No)
                {
                    this.DialogResult = DialogResult.None;
                    return;
                }
            }
            catch (AmazonClientException) { }

            // Raise an Added event with the new values
            ProfileEventArgs args = new ProfileEventArgs(name, accessKeyId, secretKey);

            ProfileAdded?.Invoke(this, args);
        }
Exemplo n.º 3
0
 protected void OnProfileAdded(WindowProfile newProfile)
 {
     ProfileAdded?.Invoke(this, new WindowProfileEventArgs(newProfile));
 }