/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns>A hash code for the current <see cref="T:System.Object" />.</returns> public override int GetHashCode() { return((string.IsNullOrWhiteSpace(ImageFilePath) ? 0 : ImageFilePath.GetHashCode()) ^ MountMode.GetHashCode() ^ (string.IsNullOrWhiteSpace(MountPath) ? 0 : MountPath.GetHashCode()) ^ MountStatus.GetHashCode()); }
public static int MountDevBlind(MountMode mode) { if (mode == MountMode.MountPartition) { return(cl.DownloadString("http://" + IP + "/dev_blind?1").Contains("/dev_blind: ") ? 0 : -1); } else if (mode == MountMode.UnmountPartition) { return(cl.DownloadString("http://" + IP + "/dev_blind?0").Contains("/dev_blind: ") ? 0 : -1); } else { return(-1); } }
internal static MountEventArgs Select(MountMode mode) { if (mode == MountMode.Show) { return(Show); } else if (mode == MountMode.Refresh) { return(Refresh); } else if (mode == MountMode.Reload) { return(Reload); } else { return(null); } }
private MountEventArgs(MountMode mode) { Mode = mode; }
internal void OnMounted(MountMode mode) { Template.MountAttachedScalarBindings(); IsAttachedScalarBindingsInvalidated = true; OnMounted(MountEventArgs.Select(mode)); }
private void Mount(DataView dataView, DataSet <T> dataSet, Predicate <DataRow> where, IComparer <DataRow> orderBy, MountMode mode) { var inherit = mode != MountMode.Show; var oldLayoutManager = _layoutManager; var template = inherit ? Template : new Template(); Debug.Assert(template != null); if (inherit) { DetachView(); AttachView(dataView); } DataSet = dataSet.EnsureInitialized(); using (var builder = new TemplateBuilder(template, DataSet.Model, inherit)) { BuildTemplate(builder); builder.Seal(); } _layoutManager = LayoutManager.Create(inherit ? oldLayoutManager : null, this, template, dataSet, GetMatchColumns(dataSet._), where, orderBy); ServiceManager.Reset(this, mode == MountMode.Reload); OnMounted(mode); dataView.OnDataLoaded(); }