示例#1
0
        public static String GetVersionString()
        {
            // ZanoFineTuning v0.0.10
            StringBuilder sb = new StringBuilder(100);
            sb.AppendFormat("ZanoFineTuning v{0}.{1}.{2}", 0, 0, 10);
            sb.Append(", ");

            LibZano.Version version = new LibZano.Version();
            Library.GetLibZanoVersion(ref version);

            sb.AppendFormat("LibZano: {0}.{1}.{2}", version.Major, version.Minor, version.Revision);

            return sb.ToString();
        }
示例#2
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            Instance = this;

            Library.SerialNumber serialNb = new Library.SerialNumber();

            StringBuilder sn = new StringBuilder(16);
            Library.GetSerialNumber(Z.Handle, ref serialNb);

            for (int i = 0; i < 8; i++)
            {
                sn.AppendFormat("{0:x2}", serialNb.Part[i]);
            }

            Header.Content = String.Format("Results for {0}", sn.ToString());

            LibZano.Version version = new LibZano.Version();
            Library.GetFirmwareVersion(Z.Handle, ref version);

            VersionHardware.Text = version.Hardware.ToString();
            VersionMajor.Text = version.Major.ToString();
            VersionMinor.Text = version.Minor.ToString();
            VersionRevision.Text = version.Revision.ToString();

            XValue.Text = Library.GetAccelOffsetConfiguration_X(Z.Handle).ToString();
            YValue.Text = Library.GetAccelOffsetConfiguration_Y(Z.Handle).ToString();
            ZValue.Text = Library.GetAccelOffsetConfiguration_Z(Z.Handle).ToString();

            XMinValue.Text = Library.GetAccelOffsetConfiguration_MinX(Z.Handle).ToString();
            YMinValue.Text = Library.GetAccelOffsetConfiguration_MinY(Z.Handle).ToString();
            ZMinValue.Text = Library.GetAccelOffsetConfiguration_MinZ(Z.Handle).ToString();

            XMaxValue.Text = Library.GetAccelOffsetConfiguration_MaxX(Z.Handle).ToString();
            YMaxValue.Text = Library.GetAccelOffsetConfiguration_MaxY(Z.Handle).ToString();
            ZMaxValue.Text = Library.GetAccelOffsetConfiguration_MaxZ(Z.Handle).ToString();
        }