private void btnLogItem_Click(object sender, System.Windows.RoutedEventArgs e) { Button btn = (Button)sender; if (btn.Tag != null) { MyLogItem li = (MyLogItem)btn.Tag; if (li != null) { if (li.oTag != null) { RscFtpServerDataItemFileInfo fi = (RscFtpServerDataItemFileInfo)li.oTag; if (fi.IsFolder) { if (m_ftpc.WorkingDirectory.Length == 0) { return; } SetLastFile(fi.GetItemTitle(), true); } else { SetLastFile(fi.GetItemTitle(), false, long.Parse(fi.m_sSize)); } return; } } } SetLastFile("", false); }
private void _Log(string sCh, string sLog, bool bSent = true, bool bDataItem = false, object oTag = null) { MyLogItem li = new MyLogItem(); li.Parent = m_logs; li.bFullEmpty = false; if (sCh.Length == 0 && sLog.Length == 0) { li.bFullEmpty = true; } li.bSent = bSent; li.sCh = sCh; li.sLog = sLog; li.bDataItem = bDataItem; li.oTag = oTag; m_logs.Insert(0, li); _RefreshStatusText(); }