Ejemplo n.º 1
0
 void DescribeActions()
 {
     StringBuilder sb = new StringBuilder();
     DateTime t = DateTime.Now;
     if (movingFilter == null && connectingPin == null) //no action yet
     {
         sb.Append("Right click for menu. ");
         Filter filter = graph.FilterInPoint(mousepos);
         if (filter != null)
         {                    
             Pin pin = filter.PinInPoint(mousepos);
             if (pin != null) 
             { 
                 if (pin.Connection == null)
                     sb.Append("Drag with left button down for intelligent connect, with right button for direct connect, left click to see media types. ");
                 AddToAnimated(pin, t);
             } else
                 sb.Append("Drag with left button down to move filter, left click to select and see properties. Shift+click to add to selection. ");
             AddToAnimated(filter, t);
         } else {
             int con_id = HoveredConnectionID();
             if (con_id > 0)
             {
                 sb.Append("Left click to see connection mediatype. ");
                 if (graph.SelectedConnection != null && graph.SelectedConnection.ID == con_id)
                     sb.Append("Press Del to remove connection. ");
                 PinConnection con = graph.ConnectionWithID(con_id);
                 if (con != null) AddToAnimated(con, t);
             }
             else
                 if (selecting)
                     sb.Append("Release mouse button to select filters in rectangle. ");
                 else
                     if (graph.HasFilters)
                         sb.Append("Drag mouse with left button down to select several filters. ");
             
         }
     }
     if (movingFilter != null)
         sb.Append("Release mouse button to stop moving filters. ");
     if (graph.SelectedFilters.Count > 0)
         sb.Append("Press Del to remove selected filters. ");
     if (connectingPin != null)
         if (otherPin != null)
             sb.Append("Release mouse button to attempt connection. ");
         else
             sb.Append("Move mouse to the pin you want to connect to. ");
     if (RegistryChecker.R[1]==0 && RegistryChecker.R[0] != 0)
         sb.AppendFormat("{0} days to evaluate. ", RegistryChecker.R[93]);
     //sb.AppendFormat("R {0} {1}", RegistryChecker.R[0], RegistryChecker.R[1]);
     //sb.AppendFormat(" {0} animated", animated_objects.Count);
     Program.mainform.SetHint(sb.ToString());
 }