Esempio n. 1
0
 protected override void ShowDialog(string[] supportedLocales, IOptions options)
 {
     State = null;
     m_SubscriptionCTRL.Visible = true;
     OptionsBTN.Visible         = false;
     m_BrowseCTRL.Visible       = false;
     base.ShowDialog(supportedLocales, options);
 }
Esempio n. 2
0
 /// <summary>
 /// Removes a previously created subscription.
 /// </summary>
 private void UndoCreate()
 {
     BackBTN.Enabled       = false;
     NextBTN.Visible       = true;
     CancelBTN.Visible     = true;
     DoneBTN.Visible       = false;
     OptionsBTN.Visible    = false;
     m_BrowseCTRL.Visible  = false;
     m_ItemsCTRL.Visible   = true;
     m_ResultsCTRL.Visible = false;
     State = null;
     m_SubscriptionCTRL.Visible = true;
 }
Esempio n. 3
0
 /// <summary>
 /// Creates a subscription with the specified parameters.
 /// </summary>
 private void DoCreate()
 {
     // assign a globally unique handle to the subscription.
     State = m_SubscriptionCTRL.Get();
     State.ClientHandle = Guid.NewGuid().ToString();
     // move to add items panel.
     BackBTN.Enabled            = true;
     NextBTN.Visible            = true;
     OptionsBTN.Visible         = true;
     m_SubscriptionCTRL.Visible = false;
     m_BrowseCTRL.Visible       = true;
     m_ItemsCTRL.Visible        = true;
     m_ResultsCTRL.Visible      = false;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SubscriptionTreeNode"/> class.
 /// </summary>
 /// <param name="subscription">The subscription <see cref="OpcDa::SubscriptionState"/>.</param>
 /// <param name="items">The items <see cref="OpcDa::Item"/>.</param>
 /// <param name="parent">The parent <see cref="OPCSessionServer"/>.</param>
 internal SubscriptionTreeNodeSession(OpcDa::SubscriptionState subscription, OpcDa::Item[] items, OPCSessionServer parent)
     : base("", null, parent)
 {
     NormalizeSubscriptionName(subscription);
     Text   = subscription.Name;
     m_Menu = new ContextMenuSubscription(this);
     State  = subscription;
     Clear();
     foreach (OpcDa::Item item in items)
     {
         new TagTreeNode(item, this);
     }
     this.Expand();
     AssignImageIndex();
 }
 /// <summary>
 /// Unsubscribe this instance - remove the subscription from the server.
 /// </summary>
 internal void Unsubscribe()
 {
     try
     {
         //save in lokals fields the current state of the subscription
         h_State   = Tag.GetState();
         h_Enabled = Tag.Enabled;
     }
     catch (Exception ex) { MessageBox.Show(ex.Message, "Unsubscribe", MessageBoxButtons.OK, MessageBoxIcon.Error); }
     finally
     {
         Subscription.RaiseSubscriptionModified(Tag, true);
         Tag.Dispose();
         Tag = null;
         AssignImageIndex();
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Handles the Click event of the Cancel button.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 protected override void CancelBTN_Click(object sender, EventArgs e)
 {
     State = null;
     base.CancelBTN_Click(sender, e);
 }