예제 #1
0
 protected override void OnMouseLeave(MouseEventArgs e)
 {
     actions.CancelDelayedAction("hover");
     tipColumn = null;
     OnExitColumn();
     base.OnMouseLeave(e);
 }
예제 #2
0
        void OnListBoxMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            delayedActions.CancelDelayedAction("SingleClick");
            object item = GetElementFromPoint(listBox1, e.GetPosition(listBox1));

            if (item is AccountViewModel m)
            {
                if (item is AccountSectionHeader)
                {
                    // Don't allow Property editing of AccountSectionHeader types
                }
                else
                {
                    this.Selected = m;
                    Account a = this.SelectedAccount;
                    EditDetails(a);
                }
            }
        }
        private void OnMessageReceived(object sender, MavLinkMessage e)
        {
            if (e.MsgId == MAVLINK_MSG_ID.LOG_ENTRY)
            {
                if (e.TypedPayload is mavlink_log_entry_t)
                {
                    List <LogEntryModel> list  = new List <LogEntryModel>();
                    mavlink_log_entry_t  entry = (mavlink_log_entry_t)e.TypedPayload;
                    UiDispatcher.RunOnUIThread(() =>
                    {
                        logList.Add(new LogEntryModel(entry));
                        delayedActions.CancelDelayedAction("GetList");
                    });
                }
            }
            else if (e.MsgId == MAVLINK_MSG_ID.LOG_DATA)
            {
                if (e.TypedPayload is mavlink_log_data_t)
                {
                    var logdata = (mavlink_log_data_t)e.TypedPayload;
                    if (logdata.id == selectedEntry.id)
                    {
                        lock (data)
                        {
                            lastChunkTime    = Environment.TickCount;
                            totalDownloaded += logdata.count;
                            data.Add(logdata);
                        }

                        if (holes.Count > 0)
                        {
                            FetchNextHole(logdata);
                        }
                    }
                }
            }
        }