Ejemplo n.º 1
0
 public void SetTarget(SignTargetUI toConfigure)
 {
     ResponseObject       = toConfigure;
     Configuring          = toConfigure.Target;
     InitialConfiguration = Configuring.CurrentConfiguration();
     ResetView();
 }
Ejemplo n.º 2
0
 public void SetTarget(SignTargetUI toConfigure)
 {
     ResponseObject = toConfigure;
     Configuring = toConfigure.Target;
     InitialConfiguration = Configuring.CurrentConfiguration();
     ResetView();
 }
Ejemplo n.º 3
0
        void AddSignTarget(ISignTarget target)
        {
            SignTargetUI targetUI = new SignTargetUI(this);

            targetUI.uiPanel.Width = flowLayoutPanel1.Width;
            flowLayoutPanel1.Controls.Add(targetUI.uiPanel);
            flowLayoutPanel1.Controls.SetChildIndex(targetUI.uiPanel, 0);

            targetUI.Label = target.SignName;

            if (target is SignPreview)
            {
                // Mirror the last non-preview configuration.
                ((SignPreview)target).Show();
                //this.BringToFront(); // not sure if I like this.
            }
            targetUI.Target = target;



            lock (Targets)
            {
                if (Targets.Count == 0)
                {
                    Animate.SetConfiguration(target.CurrentConfiguration());
                }
                else
                {
                    target.ApplyConfiguration(Targets[0].Target.CurrentConfiguration());
                }

                Targets.Add(targetUI);
            }
        }
Ejemplo n.º 4
0
 internal void ConfigureSignTarget(SignTargetUI targetUI)
 {
     if(ConfigWindow == null)
     {
         ConfigWindow = new SignTargetConfigure(this);
         ConfigWindow.FormClosing += ConfigWindow_FormClosing;
     }
     ConfigWindow.SetTarget(targetUI);
     ConfigWindow.Show();
 }
Ejemplo n.º 5
0
 internal void ConfigureSignTarget(SignTargetUI targetUI)
 {
     if (ConfigWindow == null)
     {
         ConfigWindow              = new SignTargetConfigure(this);
         ConfigWindow.FormClosing += ConfigWindow_FormClosing;
     }
     ConfigWindow.SetTarget(targetUI);
     ConfigWindow.Show();
 }
Ejemplo n.º 6
0
 internal void RemoveSignTarget(SignTargetUI targetUI)
 {
     lock(Targets)
     {
         Targets.Remove(targetUI);
     }
     flowLayoutPanel1.Controls.Remove(targetUI.uiPanel);
     if(targetUI.Target is SignPreview)
     {
         ((SignPreview)targetUI.Target).Close();
     }
 }
Ejemplo n.º 7
0
 internal void RemoveSignTarget(SignTargetUI targetUI)
 {
     lock (Targets)
     {
         Targets.Remove(targetUI);
     }
     flowLayoutPanel1.Controls.Remove(targetUI.uiPanel);
     if (targetUI.Target is SignPreview)
     {
         ((SignPreview)targetUI.Target).Close();
     }
 }
Ejemplo n.º 8
0
 public void UpdateConfiguration(SignTargetUI target)
 {
     // Apply configuration to all other displays for now. Maybe support multiple configurations in the future.
     SignConfiguration c = target.Target.CurrentConfiguration();
     foreach(SignTargetUI t in Targets)
     {
         if(t != target)
         {
             t.Target.ApplyConfiguration(c);
         }
     }
     Animate.SetConfiguration(c);
 }
Ejemplo n.º 9
0
        public void UpdateConfiguration(SignTargetUI target)
        {
            // Apply configuration to all other displays for now. Maybe support multiple configurations in the future.
            SignConfiguration c = target.Target.CurrentConfiguration();

            foreach (SignTargetUI t in Targets)
            {
                if (t != target)
                {
                    t.Target.ApplyConfiguration(c);
                }
            }
            Animate.SetConfiguration(c);
        }
Ejemplo n.º 10
0
 public void CompleteConfiguration(SignTargetUI target)
 {
     target.UseConfigureDisplay = false;
 }
Ejemplo n.º 11
0
        void AddSignTarget(ISignTarget target)
        {
            SignTargetUI targetUI = new SignTargetUI(this);

            targetUI.uiPanel.Width = flowLayoutPanel1.Width;
            flowLayoutPanel1.Controls.Add(targetUI.uiPanel);
            flowLayoutPanel1.Controls.SetChildIndex(targetUI.uiPanel, 0);

            targetUI.Label = target.SignName;

            if(target is SignPreview)
            {
                // Mirror the last non-preview configuration.
                ((SignPreview)target).Show();
                //this.BringToFront(); // not sure if I like this.
            }
            targetUI.Target = target;

            lock (Targets)
            {
                if (Targets.Count == 0)
                    Animate.SetConfiguration(target.CurrentConfiguration());
                else
                    target.ApplyConfiguration(Targets[0].Target.CurrentConfiguration());

                Targets.Add(targetUI);
            }
        }
Ejemplo n.º 12
0
 public void CompleteConfiguration(SignTargetUI target)
 {
     target.UseConfigureDisplay = false;
 }